Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to change the code to QM code
#2
Macro Macro2132
Code:
Copy      Help
;Shell "regsvr32 / s "
RegisterComComponent "sydt.dll" 4
;Set sydt = CreateObject ("sy.dt")
IDispatch sydt._create("sy.dt")

Often don't need to register COM dlls. Try this:
Macro Macro2133
Code:
Copy      Help
;Set sydt = CreateObject ("sy.dt")
IDispatch sydt._create("{SYDT-CLASS-GUID}" "sydt.dll")

If have type library:
Macro Macro2135
Code:
Copy      Help
;Set sydt = CreateObject ("sy.dt")
typelib Sydt "sydt.dll" 1
Sydt.Class1 sydt._create(0 "sydt.dll")
;or
IDispatch sydt._create(uuidof(Sydt.Class1) "sydt.dll")
;or, if component registered
Sydt.Class1 sydt._create

Can use LoadLibrary, but usually we declare dll functions instead:
dll "sydt.dll"
,Func1 a b
,Func2 c d

Need to declare correct parameter types etc, read more in dll help.
Many Windows API are already declared, + you can download more Windows declarations.


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)