>Ok, now THAT was REALLY Embarrassing! :o)
>
>Given that I
NOW check for <> 0 (SILLY ME) instead of .T. it is
NOW not throwing an error, but it IS returning 0 no matter how I seem to set m.lcDeviceInterfaceData beforehand:
>
>m.lcDeviceInterfaceData = Padr(BinToC(28, [4RS]), 4, Chr(0)) + Replicate(Chr(0), 24)
>m.lcDeviceInterfaceData = CHR(32)+CHR(0)+CHR(0)+CHR(0)
>m.lcDeviceInterfaceData = long2str(32)+REPLICATE(CHR(0),28)
>m.lcDeviceInterfaceData = num2dword(32)+num2dword(0)+num2dword(0)+num2dword(0)+num2dword(0)
>
>Yet, I am sure the other parameters I pass are all good. Can you easily determine what is wrong with the manner(s) in which I attempted to set m.lcDeviceInterfaceData? None of the above return anything other than 0 so I am missing something obvious is setting m.lcDeviceInterfaceData...
>
>
>And this works:
>>
> m.lnRetVal = SetupDiEnumDeviceInfo( ;
> m.lnDeviceInfoSet, ;
> m.lnx, ;
> @m.lcDeviceInfoData)
>
>
>but I cannot get a result <> 0 from SetupDiEnumDeviceInterfaces()
>>
>By the way, I should have caught that immediately:
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/devio/base/setupdienumdeviceinterfaces.asp>
Return Values>If the function succeeds, the return value is nonzero.
>If the function fails, the return value is zero. To get extended error information, call GetLastError.
What is the result of this? Here it geves me "The handle is invalid"
? SetupDiEnumDeviceInterfaces(m.lnDeviceInfoSet, ;
@m.lcDeviceInfoData, ;
@m.lcClassGuid, ;
m.lnx,;
@m.lcDeviceInterfaceData)
lnLastE = GetLastError()
? m1
lcBuffer = SPACE(512)
FormatMessage(0x1000, 0, lnLastE, 0, @lcBuffer,512,0)
? lcBuffer
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.