Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GetDeviceCaps?!?!
Message
From
21/08/2000 12:52:04
Ronald Suen
Epic Solutions Inc.
Edmonton, Alberta, Canada
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00407348
Message ID:
00407379
Views:
17
>>Hello all,
>>
>>I am having one heck of a time trying to use GetDeviceCaps(). I found code that uses the FoxTools.FLL to access this function however I do not want to distribute any more libraries than I already have to. With this in mind, I've attempted to call it as an API function. MSDN says that this function is declared in the GDI32.LIB but I am unable to locate this on my system. Is this a library that is typically distributed in a Win 95/98/2000/NT environment? I've tried doing the following:
>
>>DECLARE INTEGER GetDeviceCaps IN GDI32 LONG, INTEGER
>>
>>but whenever I try to run the function, I receive "Cannot find entry point getdevicecaps in the DLL". I've tried substituting GDI32 with WIN32API but that doesn't seem to work either. Can someone provide me with some guidence on this one?
>>
>>Thanks in advance.
>
>Yes, GDI32.DLL is a standard part of Win32. It sounds like your declaration isn't what's shown above. What's shown above is correct, however, if it isn't done exactly as shown, you'll get an error because DLL declarations are case sensitive. So IOW, if you issue:
>
>declare integer getdevicecaps IN GDI32 INTEGER, INTEGER
>
>you'll get this error.
>
>Take a look at the doc on the DECLARE - DLL command, it'll show you what functions the Win32API declaration as the library searches.

I've looked at the doc on the DECLARE - DLL command, and I know that the WIN32API declaration DOES look at GDI32.DLL, but the MSDN says that the GetDeviceCaps() function is in GDI32.LIB...is there a difference between these two files? I am unable to locate the LIB in my system which is the reason why I'm asking if it is a file that is typically installed in a Win environment.

As for my declaration, other than the case of the text, it is exactly the same. I've tried mimicking the declaration and calling in the command window and I get the same results. I've also tried changing my declaration of a LONG INTEGER to an INTEGER but that does not seem fix this problem.

Help!

Thanks in advance.
Ronald Suen
Epic Information Solutions Inc.
Ph: (780) 488-4418
Fax: (780) 488-0402
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform