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.aspReturn ValuesIf the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
.·*´¨)
.·`TCH
(..·*
010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"