When I have the above declarations and compile the file I get an error saying that func1() and func2() are already defined. Is there a solution for this problem? I cannot put them in 2 seperate files, because my test cases should use both the dlls.
I have the following and I am getting an error when I am trying it out:
inprocess int SftTree_GetCount(HWND hwnd)
inprocess int SftTree_GetCount45(HWND hwnd) alias "int SftTree_GetCount(HWND hwnd)"
I am calling the function and I am getting an error:
One thing to notice is that SilkTest does not do type checking hence it's very important to make sure that what you pass in the function is what it's required. Even if your code compiles in SilkTest it does not guarantee that the function call will succeed.
One simple example is that regular SilkTest (not international version) use all ANSI strings hence if your DLL is in Unicode you need to do string conversion - MultiByteToWideChar otherwise it will just fail to do the correct things like opening a file. This is a simple example you can imagine other problems.
Also SilkTest will accept any C/C++ style DLL. Using a standard win32 DLL project + .DEF will work just fine (I am sure of it now).
I've related to DLL question. How can I initiate DLL's class to make a call to it method?
Letís take "System.XML.dll" as an example which has lots of classes. I'm particularly interested in few XmlDocument and XmlNode. XmlDocument has method Load (String Xml) how can I call this method from SilkTest?
If I want to initiate that DLL and make a call to Load () method how it should be done syntax wise in SilkTest.
Iím sure this is incorrect (I have to first initiate XmlDocument object then call method).
The question is HOW?
</font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">
[+] dll "System.Xml.dll"
[ ] void Load (STRING sXml)</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">I need your help guys !!!
P.S. Perhaps I might need to write dll wrapper or ...
I got an answer back and read some more about the extension kit. It seems that the extension kit does make it possible to use DLLs with classes, but requires that the DLLs be modified to communicate with the agent. The support guy also said that testing a DLL with no GUI whatsoever is not really the intent of the Extension Kit.