GetPrinterApi returns 0. Please help.
![]()
Please Login or Register to view this content.
GetPrinterApi returns 0. Please help.
![]()
Please Login or Register to view this content.
Hello macarius ,
Here is an API routine I wrote to return the status of the Active Printer. The return value is a string.
![]()
Please Login or Register to view this content.
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Starbelow the post.
3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
Crashes Excel 2007. Curious. Any experience with this?![]()
Please Login or Register to view this content.
Hello macarius ,
What version of Windows are you running?
http://www.vbforums.com/showthread.php?t=548903
Could you help adapt the CopyMemory command with suggested fix from this site?
Most appreciate your expertise in the matter.
Methinks it must be the 64-bit architecture. Instead of variable type Long, need to use LongPtr. Tried to change without success--keeps crashing. I also tried LONG_PTR which was available--no go. Please, send your thoughts. Need this ASAP--by COB tomorrow. Thanks for all your support.
Hello macarius,
I made the needed changes to the code to work with 64 bit Windows but it is untested as I don't have a 64 bit platform. Hopefully, it will run without crashing. Let me know what happens.
![]()
Please Login or Register to view this content.
Firstly, appreciate your efforts.
My machine is running Win7, but Office 2007 which is only 32-bit AFAIK. The code below is not supported by Office 2007 32-bit on a 64-bit OS. I noticed LONG_PTR was available, but not LongPtr.
Any ideas?
![]()
Please Login or Register to view this content.
Hello macarius ,
"Long_Ptr" is C Data Type, not VBA. The API has only 2 platforms: 32 and 64 bit. I have posted the code for both. Unless I were there to troubleshoot your system, we are not going to resolve this problem.
4 environments: 32-bit office 2007 and 2010, 64-bit 2010 only; then Win7 32- or 64-bit.
You wrote code for WinOS 32-bit for 2007 or 2010 32-bit; also for WinOS 64-bit for 2010 64-bit; my scenario is WinOS 64-bit, Office 2007 32-bit.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks