Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GetDeviceCaps?!?!
Message
 
To
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:
00407414
Views:
27
>>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.

That's the library GDI32.DLL comes from. Trust me, in it's (GetDeviceCaps) in there.

>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.
>
The following is from my command window, with comments added:
DECLARE INTEGER GetDC IN Win32API;
  INTEGER hWnd
DECLARE INTEGER GetDeviceCaps IN Win32API;
  INTEGER hDC, INTEGER nIndex
lnhDC = GetDC(0)
? GetDeviceCaps(lnhDC, 14) && Works fine
DECLARE INTEGER GetDeviceCaps IN GDI32 LONG, INTEGER
? GetDeviceCaps(lnhDC, 14) && Works fine
DECLARE INTEGER getdevicecaps IN GDI32 LONG, INTEGER
? GetDeviceCaps(lnhDC, 14) && Cannot find entry point...
GDI32.DLL is a standard part of Win32. So if you're running VFP 3.0 or higher on Win9x or WinNT 3.51 or higher, this should work fine.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform