ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Ecaradec's Software

Qatapult

<< < (52/67) > >>

ewemoa:
However I've also found this activex component that might be easier to integrate as it already provide the activescripting binding :

http://www.borncity.com/web/WSHBazaar1/WSHDynaCall.htm
-ecaradec (March 16, 2012, 04:04 PM)
--- End quote ---

There appears to be a more recent modified version:

  http://glsft.free.fr/index.php?option=com_content&task=view&id=47&Itemid=33

I suspect you will have a much easier time understanding the article than me :)

ecaradec:
I tried it and it works nicely.

I'm not sure about what you're trying to accomplish, but listing the items in you catalog can be accomplished by adding a extra rule that list objects from your collect source. It could be a rule like : List Notes,LINENOTE. This is the method I would favor as you can customise the icon etc...

When you'll type list notes, Qatapult will query all plugins for LINENOTE object. I'm not sure if this is a good idea or not you can also return TEXT object when rules expect TEXT and LINENOTE when then expect that.

I think there is something that is missing here, it should be possible to return multityped objects or something, because you can't really reuse LINENOTE objects as TEXT because they won't be recognized by rules as such... If you have some thoughts about that let me know.

ewemoa:
DynaWrap worked for a simple case :)

Here is a rough summary of a test:

0. Download dynawrapNT.zip and extract the dynawrap.dll file (MD5: ca218f1aa4bf60d5deacebe0f55a2f95).

1. As admin, run cmd.exe and in the directory containing dynawrap.dll execute:


--- ---RegSvr32.exe dynawrap.dll
2. In a .js file of some Qatapult plugin, appropriately add something like:


--- Code: Javascript ---// :)  var dw;  dw = new ActiveXObject("DynamicWrapper");  dw.Register("User32.dll", "MessageBoxA", "f=s", "i=hssu", "r=l");  dw.MessageBoxA(null, "Here is a test", "So?", 0);
3. Execute plugin functionality that calls the code added above.

4. Observe a message box.

Tested with Windows 7 Pro 64-bit and Windows XP Pro SP3.


The following was helpful:

  How to use DynamicWrapper?


Attached the dynawrap zip file for the time being.

MD5: a27c9c53fb22379463b6f2e3cb812d45

ewemoa:
Not sure how to use DynaCall / DynaWrap in JScript for functions requiring pointers...e.g. ReadFile:


--- Code: C ---BOOL WINAPI ReadFile(  __in         HANDLE hFile,  __out        LPVOID lpBuffer,  __in         DWORD nNumberOfBytesToRead,  __out_opt    LPDWORD lpNumberOfBytesRead,  __inout_opt  LPOVERLAPPED lpOverlapped);
The more recent DynaWrap version mentioned earlier had the following:

FormatMessage (dwMessageId)                                          
GetBSTRAddr (String)                                                  
GetLastError ()                                                      
GetMemInBSTRAddr (dwBSTRAddr, dwOffset, nDataType)                    
GetRegistered ()                                                      
GetVariantAddr (Var)                                                  
Register (DllName, Win32Api, [TypeOfCall], [ReturnDT], [InputDT])    
SetMemInBSTRAddr (dwBSTRAddr, dwOffset, nDataType, Data)              
Version
--- End quote ---

I didn't think trying GetBSTRAddr would work, but I tried it anyway -- sadly without success.

Any ideas?

ecaradec:
Correct, I can't get GetBSTRAddr to work either. May be that's a javascript issue as the component seems to be made to work with VBScript ? I asked the developer he doesn't mind to share his sources and we will not go really far without the sources.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version