This question inpsired me to try this in VB6. I did a search and copied what I saw at
http://forums.devshed.com/t158692/s.html
However I'm running into the same problem they are. When I try to run:
res = Python.PyRun_SimpleString("5+7")
I get the error message:
Bad DLL calling convention (Error 49)
Which VB help describes as:
Arguments passed to a dynamic-link library (DLL) must exactly match those expected by the routine. Calling conventions deal with number, type, and order of arguments. This error has the following causes and solutions:
- Your program is calling a routine in a DLL that's being passed the wrong
type of arguments.
Make sure all argument types agree with those specified in the declaration of the routine you are calling.
- Your program is calling a routine in a DLL that's being passed the wrong
number of arguments.
Make sure you are passing the same number of arguments indicated in the declaration of the routine you are calling.
- Your program is calling a routine in a DLL, but isn't using the StdCall
calling convention.
If the DLL routine expects arguments by value, then make sure ByVal is specified for those arguments in the declaration for the routine.
- Your Declare statement for a Windows DLL includes CDecl.
Any ideas?
-Greg
On 8/26/05, Gregory Piñero <[EMAIL PROTECTED]> wrote:
How do I get it into VB6? Now that's an answer that would save my life many times over.
-Greg--On 8/26/05, Alessandro Bottoni < [EMAIL PROTECTED]> wrote:
Thomas Bartkus wrote:
> Name: lib64python2.4-devel
> Summary: The libraries and header files needed for Python development
>
> Description: The Python programming language's interpreter can be extended
> with dynamically loaded extensions and can be embedded in other programs.
> This package contains the header files and libraries needed to do these
> types of tasks.
> ------------------------------------------------------
>
>
> *** The Python programming language's interpreter ... can be embedded in
> other programs. ***
>
> That's very intriguing!
> But I can't seem to locate much information about this.
>
> Can anyone direct me to greater enlightenment?
> Thomas Bartkus
There is a section of the official documentation devoted to extending and
embedding python:
http://docs.python.org/ext/ext.html![]()
There are a few articles on this topics on the web, as well. Search
"embedding python" with Google.
-----------------------------------
Alessandro Bottoni
--
http://mail.python.org/mailman/listinfo/python-list![]()
Gregory Piñero
Chief Innovation Officer
Blended Technologies
(www.blendedtechnologies.com)
--
Gregory Piñero
Chief Innovation Officer
Blended Technologies
(www.blendedtechnologies.com)
-- http://mail.python.org/mailman/listinfo/python-list