General information
Category:
Coding, syntax & commands
Ismael, thanks for your reply.
Regards,
Gerard
>HI Gerard!
>
>The below code works in Win95/98/NT and I used it in my application. Im not pretty sure if it will work in Win2000, anyway, you may try it and see the result!!!
>
>Thanks,
>
>Joe
>
>>Ismael, thanks foe your reply.
>>Do you know if this code works in Win95/98/NT and 2000 ?
>
>>Regards,
>
>>Gerard
>
>
>
>
>
>>Hi!
>>
>>try the this code:
>>
>>-------------------------------------------------
>>
>>cOCXFile= getfile("DLL|OCX")
>>if ThsNotOcx(cOCXFile) = .f.
>> wait window "nOT YER REGISTERED"
>> return .f.
>>endif
>>
>>*ENDIF
>>
>>function ThsNotOcx
>> lparameter pRegOcx
>> public glError
>> glError=.f.
>> local frmOLETest, lcText, lReturn, lcError
>> lReturn = .t.
>> frmOLETest = createobject('Form')
>> lcError = on('ERROR')
>> on error store .t. to glError
>> frmOLETest.addobject('OCXTest', 'OLEControl', pRegOcx)
>> on error &lcError
>> if glError
>> if ThsRegOcxDll(pRegOcx)# 0
>> lReturn = .f.
>> endif
>> endif
>> frmOLETest.release()
>> frmOLETest=null
>> clear typeahead
>> release glError
>> return lReturn
>>endfunc
>>
>>function ThsRegOcxDll
>> lparameter pRegOcx
>> local lcRegOcx, lnRetOcx
>> lnRetOcx = 1
>> lcRegOcx = pRegOcx
>> if file(lcRegOcx)
>> declare integer DllRegisterServer in (lcRegOcx) as __DllRegisterServer__
>> lnRetOcx = __DllRegisterServer__()
>> endif
>> return lnRetOcx
>>endfunc
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only