Trying to write an extension for VDS
Posted: Wed Jun 30, 2004 11:33 am
I've written a simple DLL which works fine.
Now I want to convert it into Visual Dialogscript extension format so that it is compatible with VDS 5.
But I can't seem to get it working.
Here is a link to the VDS developer forum with some info on writing an extension in C++
http://developer.vdsworld.com/viewtopic.php?t=41
And here's the codes I have so far: (VDS code)
And the DLL file it self:
Hopefully someone can help me with this.
Now I want to convert it into Visual Dialogscript extension format so that it is compatible with VDS 5.
But I can't seem to get it working.
Here is a link to the VDS developer forum with some info on writing an extension in C++
http://developer.vdsworld.com/viewtopic.php?t=41
And here's the codes I have so far: (VDS code)
Code: Select all
TITLE VDS Extension test
EXTERNAL @path(%0)extension2.dll,DEMO
#define command,TestDLL
TestDLL testCode: Select all
Global pVer.s
hWnd = WindowID()
pVer.s = "1.0.0.0"
maxpar = 1
bufsize = 255
handle = 1
ProcedureDLL Init(handle, maxpar, bufsize, KeyString$)
Parameter$ = "Init" + Chr(10) + ProgramParameter()
MessageRequester("Result", Parameter$)
If KeyString$ = "DEMO"
MessageRequester("Result","You are running in DEMO mode.")
EndIf
Name$ = "TestDLL"
ProcedureReturn Name$
EndProcedure
ProcedureDLL CommandProc(string$)
Parameter$ = "CommandProc" + Chr(10) + ProgramParameter() + Chr(10) + Command$
MessageRequester("Result", Parameter$)
EndProcedure
ProcedureDLL FuncProc(string$)
Parameter$ = "FuncProc" + Chr(10) + ProgramParameter()
MessageRequester("Result", Parameter$)
EndProcedure
ProcedureDLL StatProc()
Parameter$ = "StatProc" + Chr(10) + ProgramParameter()
MessageRequester("Result", Parameter$)
EndProcedure
ProcedureDLL TestDLL()
MessageRequester("Result","This is the TestDLL.")
EndProcedure
; Init - Where you Return the command/function name your DLL uses.(Such as "MyDLL")
; CommandProc - Where you process your DLL's command.(When a user uses MyDLL <params here>)
; FuncProc - Where you process your DLL's function.(When a user uses @MyDLL(<params here>)
; StatProc - Where your DLL returns an error code/sets @OK To true Or false.