Trying to write an extension for VDS

Windows specific forum
User avatar
GeoTrail
Addict
Addict
Posts: 2794
Joined: Fri Feb 13, 2004 12:45 am
Location: Bergen, Norway
Contact:

Trying to write an extension for VDS

Post by GeoTrail »

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)

Code: Select all

TITLE VDS Extension test
EXTERNAL @path(%0)extension2.dll,DEMO

#define command,TestDLL

TestDLL test
And the DLL file it self:

Code: 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.
Hopefully someone can help me with this.
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!