[Python.NET] Mapped DataTypes of Python to .NET

Satya Prasad <[email protected]> Wed, 9 Jun 2021 20:43:45 +0530
Newsgroups gmane.comp.python.dotnet
Message-ID <CACX5wcj-neOr4s-fxD7jt4vK7RYdLyuda3d_60Zi9MO2WyhfmA@mail.gmail.com>
--===============7071616219657718551==
Content-Type: multipart/alternative; boundary="00000000000031e8e805c456b9ca"

--00000000000031e8e805c456b9ca
Content-Type: text/plain; charset="UTF-8"

I have a 32 bit .NET DLL - so I made use of PythonNet Module
<http://pythonnet.github.io/> and msl.loadlib.server32 module
<https://msl-loadlib.readthedocs.io/en/latest/_api/msl.loadlib.server32.html>
as
I am using Python 64 bit version.

I am a just a beginner in this domain - and below is my query. Thru ILSpy I
can see the below signature:
[DllImport("DISCOM.DLL", CharSet = CharSet.Unicode)]
public static extern uint CancelRequests(IntPtr data);

I tried opening DISCOM.DLL via ILSpy and Pythonnet but could not do so -
how can we call the above API and create a Python datatype of IntPtr.

Please let me know how to Convert Python data types to .NET format and vice
versa

Regards,
Prakash

--00000000000031e8e805c456b9ca
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><span style=3D"color:rgb(36,39,41);font-family:-apple-syst=
em,BlinkMacSystemFont,&quot;Segoe UI&quot;,&quot;Liberation Sans&quot;,sans=
-serif;font-size:15px">I have a 32 bit .NET DLL - so I made use of=C2=A0</s=
pan><a href=3D"http://pythonnet.github.io/" rel=3D"nofollow noreferrer" sty=
le=3D"margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-v=
ariant-east-asian:inherit;font-stretch:inherit;line-height:inherit;font-fam=
ily:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,&quot;Liberation =
Sans&quot;,sans-serif;font-size:15px;vertical-align:baseline;box-sizing:inh=
erit">PythonNet Module</a><span style=3D"color:rgb(36,39,41);font-family:-a=
pple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,&quot;Liberation Sans&q=
uot;,sans-serif;font-size:15px">=C2=A0and=C2=A0</span><a href=3D"https://ms=
l-loadlib.readthedocs.io/en/latest/_api/msl.loadlib.server32.html" rel=3D"n=
ofollow noreferrer" style=3D"margin:0px;padding:0px;border:0px;font-variant=
-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-=
height:inherit;font-family:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&=
quot;,&quot;Liberation Sans&quot;,sans-serif;font-size:15px;vertical-align:=
baseline;box-sizing:inherit">msl.loadlib.server32 module</a><span style=3D"=
color:rgb(36,39,41);font-family:-apple-system,BlinkMacSystemFont,&quot;Sego=
e UI&quot;,&quot;Liberation Sans&quot;,sans-serif;font-size:15px">=C2=A0as =
I am using Python 64 bit version.</span><br><div><span style=3D"color:rgb(3=
6,39,41);font-family:-apple-system,BlinkMacSystemFont,&quot;Segoe UI&quot;,=
&quot;Liberation Sans&quot;,sans-serif;font-size:15px"><br></span></div><di=
v><span style=3D"color:rgb(36,39,41);font-family:-apple-system,BlinkMacSyst=
emFont,&quot;Segoe UI&quot;,&quot;Liberation Sans&quot;,sans-serif;font-siz=
e:15px">I=C2=A0</span>am a just a beginner=C2=A0in this domain - and below =
is my query. Thru ILSpy I can see the below signature:</div>[DllImport(&quo=
t;DISCOM.DLL&quot;, CharSet =3D CharSet.Unicode)]<br>public static extern u=
int CancelRequests(IntPtr data);<br><br>I tried opening DISCOM.DLL via ILSp=
y and Pythonnet but could not do so - how can we call the above API and cre=
ate a Python datatype of=C2=A0IntPtr.<br><br>Please let me know how to Conv=
ert Python data types to .NET format and vice versa<div><br></div><div>Rega=
rds,</div><div>Prakash</div></div>

--00000000000031e8e805c456b9ca--

--===============7071616219657718551==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
PythonNet mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/pythonnet.python.org/
Member address: [email protected]

--===============7071616219657718551==--