Hi all. Having a little bit of a problem accessing this .dll from IS 6.31.
Here's my defines/prototype/typedef:
#define DLL_FILE "setupapi.dll"
#define DIGCF_PRESENT 0x00000002
#define DIGCF_ALLCLASSES 0x00000004
#define DIGCF_PROFILE 0x00000008
#define DIGCF_DEVICEINTERFACE 0x00000010
typedef HDEVINFO
begin
LONG pHdevinfo;
end;
HDEVINFO hDevinfo;
HDEVINFO POINTER phDevinformation;
prototype NUMBER SetupAPI.SetupDiGetClassDevsA(LONG,BYVAL STRING,LONG,LONG);
The code is below:
function callmydll()
NUMBER nResult;
STRING szDLL;
begin
szDLL = DLL_FILE;
nResult = UseDLL (szDLL);
hDevinfo.pHdevinfo = SetupDiGetClassDevsA(NULL,
"", // Enumerator
0,
DIGCF_PRESENT);
if (UnUseDLL (szDLL) < 0) then
MessageBox("UnUseDLL failed.\n\nDLL still in memory.", SEVERE);
endif;
end;
pretty generic code ( I think I actually got the example on this site); the problem I keep getting is that hDevinfo keeps returning -1 no matter what I do....Can anyone help?
Thanks!
Jerry
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Setupapi help needed
Started by
elektrik
, Jul 18 2002 20:20
1 reply to this topic