Re: Need help calling a proprietary C DLL from Python

2008-03-26 Thread Craig
On Mar 26, 12:24 am, Dennis Lee Bieber [EMAIL PROTECTED] wrote: On Tue, 25 Mar 2008 08:24:13 -0700 (PDT), Craig [EMAIL PROTECTED] declaimed the following in comp.lang.python: 41 0 0 0 7 0 0 0 Which makes sense for two reasons: 1. It would only return the non-space-filled part of the

Re: Need help calling a proprietary C DLL from Python

2008-03-25 Thread Craig
On Mar 25, 2:02 am, Dennis Lee Bieber [EMAIL PROTECTED] wrote: On Mon, 24 Mar 2008 15:21:11 -0700 (PDT), Craig [EMAIL PROTECTED] declaimed the following in comp.lang.python: And this is what I got: VmxGet test - looking for valid record... Before -PriKey = 0x0044F56C,SecKey =

Re: Need help calling a proprietary C DLL from Python

2008-03-24 Thread Craig
On Mar 23, 7:59 pm, Dennis Lee Bieber [EMAIL PROTECTED] wrote: On Sun, 23 Mar 2008 14:24:52 -0700 (PDT), Craig [EMAIL PROTECTED] declaimed the following in comp.lang.python: This dll was designed to be used from either C or Visual Basic 6. I have the declare statements for VB6, if that

Re: Need help calling a proprietary C DLL from Python

2008-03-24 Thread Craig
On Mar 24, 12:27 pm, Craig [EMAIL PROTECTED] wrote: On Mar 23, 7:59 pm, Dennis Lee Bieber [EMAIL PROTECTED] wrote: On Sun, 23 Mar 2008 14:24:52 -0700 (PDT), Craig [EMAIL PROTECTED] declaimed the following in comp.lang.python: This dll was designed to be used from either C or Visual

Re: Need help calling a proprietary C DLL from Python

2008-03-24 Thread Craig
On Mar 24, 3:45 pm, Craig [EMAIL PROTECTED] wrote: On Mar 24, 12:27 pm, Craig [EMAIL PROTECTED] wrote: On Mar 23, 7:59 pm, Dennis Lee Bieber [EMAIL PROTECTED] wrote: On Sun, 23 Mar 2008 14:24:52 -0700 (PDT), Craig [EMAIL PROTECTED] declaimed the following in comp.lang.python:

Re: Need help calling a proprietary C DLL from Python

2008-03-23 Thread Craig
On Mar 23, 4:48 pm, Dennis Lee Bieber [EMAIL PROTECTED] wrote: On Sat, 22 Mar 2008 19:05:31 -0700 (PDT), Craig [EMAIL PROTECTED] declaimed the following in comp.lang.python: I got back exactly what I expected for TypeDef, but SecKey and PriKey were what I initialized them to , not what

Re: Need help calling a proprietary C DLL from Python

2008-03-22 Thread Craig
On Mar 21, 4:04 am, Dennis Lee Bieber [EMAIL PROTECTED] wrote: On Thu, 20 Mar 2008 16:50:18 -0700 (PDT), Craig [EMAIL PROTECTED] declaimed the following in comp.lang.python: I received a direct email from someone, and I came up with the following after implementing his advice:

Re: Need help calling a proprietary C DLL from Python

2008-03-22 Thread Craig
On Mar 22, 3:13 pm, Dennis Lee Bieber [EMAIL PROTECTED] wrote: On Fri, 21 Mar 2008 23:21:48 -0700 (PDT), Craig [EMAIL PROTECTED] declaimed the following in comp.lang.python: Sorry, I wasn't trying to exclude any credit from Dennis, I just wasn't sure if he wanted to be listed. As

Re: Need help calling a proprietary C DLL from Python

2008-03-22 Thread Craig
On Mar 22, 9:40 pm, Dennis Lee Bieber [EMAIL PROTECTED] wrote: On Sat, 22 Mar 2008 15:12:47 -0700 (PDT), Craig [EMAIL PROTECTED] declaimed the following in comp.lang.python: Anyway, I have the following for types: LPBSTR = POINTER(c_void_p) HANDLE = POINTER(POINTER(c_long)) LPHANDLE

Need help calling a proprietary C DLL from Python

2008-03-20 Thread Craig
I use a proprietary dll from Software Source (vbis5032.dll). I have successfully used it from Visual Basic 6, Fujitsu Cobol and from Perl. I would now like to use it from Python. The following is the C++ prototype for one of the functions: short FAR PASCAL VmxOpen(BSTR*Filespec,

Re: Need help calling a proprietary C DLL from Python

2008-03-20 Thread sturlamolden
On 20 Mar, 19:09, Craig [EMAIL PROTECTED] wrote: The culprit i here: Before - X = 0, CacheSize = 0, OpenMode = 3, vHandle = 0 This binds these names to Python ints, but byref expects C types. Also observe that CacheSize and OpenMode should be c_short. --

Re: Need help calling a proprietary C DLL from Python

2008-03-20 Thread Craig
On Mar 20, 2:29 pm, sturlamolden [EMAIL PROTECTED] wrote: On 20 Mar, 19:09, Craig [EMAIL PROTECTED] wrote: The culprit i here: Before - X = 0, CacheSize = 0, OpenMode = 3, vHandle = 0 This binds these names to Python ints, but byref expects C types. Also observe that CacheSize and

Re: Need help calling a proprietary C DLL from Python

2008-03-20 Thread Craig
On Mar 20, 2:38 pm, Craig [EMAIL PROTECTED] wrote: On Mar 20, 2:29 pm, sturlamolden [EMAIL PROTECTED] wrote: On 20 Mar, 19:09, Craig [EMAIL PROTECTED] wrote: The culprit i here: Before - X = 0, CacheSize = 0, OpenMode = 3, vHandle = 0 This binds these names to Python ints, but byref

Re: Need help calling a proprietary C DLL from Python

2008-03-20 Thread Chris Mellon
On Thu, Mar 20, 2008 at 3:42 PM, Craig [EMAIL PROTECTED] wrote: On Mar 20, 2:38 pm, Craig [EMAIL PROTECTED] wrote: On Mar 20, 2:29 pm, sturlamolden [EMAIL PROTECTED] wrote: On 20 Mar, 19:09, Craig [EMAIL PROTECTED] wrote: The culprit i here: Before - X = 0, CacheSize =

Re: Need help calling a proprietary C DLL from Python

2008-03-20 Thread Craig
On Mar 20, 4:55 pm, Chris Mellon [EMAIL PROTECTED] wrote: On Thu, Mar 20, 2008 at 3:42 PM, Craig [EMAIL PROTECTED] wrote: On Mar 20, 2:38 pm, Craig [EMAIL PROTECTED] wrote: On Mar 20, 2:29 pm, sturlamolden [EMAIL PROTECTED] wrote: On 20 Mar, 19:09, Craig [EMAIL PROTECTED] wrote:

Re: Need help calling a proprietary C DLL from Python

2008-03-20 Thread sturlamolden
On 20 Mar, 19:09, Craig [EMAIL PROTECTED] wrote: The following is the C++ prototype for one of the functions: short FAR PASCAL VmxOpen(BSTR*Filespec, LPSHORT lpLocatorSize, LPSHORT lpOmode, LPHANDLE lphwmcb,

Re: Need help calling a proprietary C DLL from Python

2008-03-20 Thread Craig
On Mar 20, 6:26 pm, sturlamolden [EMAIL PROTECTED] wrote: On 20 Mar, 19:09, Craig [EMAIL PROTECTED] wrote: The following is the C++ prototype for one of the functions: short FAR PASCAL VmxOpen(BSTR*Filespec, LPSHORT lpLocatorSize,