Re: compiler requires explicit cast?

horace <[email protected]> Fri, 26 Jun 2009 08:46:44 +0200
Newsgroups gmane.comp.python.pyrex
Message-ID <[email protected]>
--===============1804132447==
Content-Type: multipart/alternative; boundary=001636c5acf824e4a4046d3ab47c

--001636c5acf824e4a4046d3ab47c
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

On Fri, Jun 26, 2009 at 6:49 AM, horace <[email protected]> wrote:

>
>
> On Fri, Jun 26, 2009 at 3:39 AM, Greg Ewing <[email protected]>wrote:
>
>> horace wrote:
>>
>>  error C2664: 'LoadIconA' : cannot convert parameter 1 from 'void *' to
>>> 'HINSTANCE'
>>>
>>> cdef extern from "windows.h":
>>>    ctypedef void *PVOID
>>>    ctypedef PVOID HANDLE
>>>    ctypedef HANDLE HINSTANCE
>>>
>>
>> It looks like windows.h is not defining HINSTANCE as void *.
>> You'll need to find out how it is defined and do something
>> compatible in Pyrex.
>
>
>
> hm... yeah, i found the definition with google but now i checked again and
> it seems that it sometimes gets defined differently. i will try to find it
> on my harddisk but this could be a bit tricky since it doesn't seem to be
> defined in windows.h.
>




hm... all HINSTANCE definitions i find in the windows sdk are void *.
here it is void too:
http://msdn.microsoft.com/en-us/library/aa383751(VS.85).aspx

any other ideas?





>
> thanks for your help!
>
>
>
>>
>>
>> --
>> Greg
>>
>
>

--001636c5acf824e4a4046d3ab47c
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<br><br><div class=3D"gmail_quote">On Fri, Jun 26, 2009 at 6:49 AM, horace =
<span dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]">horace3d@gmail.=
com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"bor=
der-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-=
left: 1ex;">
<br><br><div class=3D"gmail_quote"><div><div></div><div class=3D"h5">On Fri=
, Jun 26, 2009 at 3:39 AM, Greg Ewing <span dir=3D"ltr">&lt;<a href=3D"mail=
to:[email protected]" target=3D"_blank">[email protected].=
nz</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, =
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
horace wrote:<br>
<br>
<blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, =
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>
error C2664: &#39;LoadIconA&#39; : cannot convert parameter 1 from &#39;voi=
d *&#39; to &#39;HINSTANCE&#39;<br>
<br></div><div>
cdef extern from &quot;windows.h&quot;:<br>
 =A0 =A0ctypedef void *PVOID<br>
 =A0 =A0ctypedef PVOID HANDLE<br></div>
 =A0 =A0ctypedef HANDLE HINSTANCE<br>
</blockquote>
<br>
It looks like windows.h is not defining HINSTANCE as void *.<br>
You&#39;ll need to find out how it is defined and do something<br>
compatible in Pyrex.</blockquote></div></div><div><br><br>hm... yeah, i fou=
nd the definition with google but now i checked again
and it seems that it sometimes gets defined differently. i will
try to find it on my harddisk but this could be a bit tricky since it
doesn&#39;t seem to be defined in windows.h.</div></div></blockquote><div><=
br><br><br><br>hm... all HINSTANCE definitions i find in the windows sdk ar=
e void *.<br>here it is void too:<br><a href=3D"http://msdn.microsoft.com/e=
n-us/library/aa383751(VS.85).aspx">http://msdn.microsoft.com/en-us/library/=
aa383751(VS.85).aspx</a><br>
<br>any other ideas?<br><br><br><br><br></div><blockquote class=3D"gmail_qu=
ote" style=3D"border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0p=
t 0.8ex; padding-left: 1ex;"><div class=3D"gmail_quote"><div><br>
<br>
thanks for your help!<br><br>=A0</div><blockquote class=3D"gmail_quote" sty=
le=3D"border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex;=
 padding-left: 1ex;"><br>
<br>
-- <br><font color=3D"#888888">
Greg<br>
</font></blockquote></div><br>
</blockquote></div><br>

--001636c5acf824e4a4046d3ab47c--


--===============1804132447==
Content-Type: text/plain; charset="iso-8859-1"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

_______________________________________________
Pyrex mailing list
[email protected]
http://lists.copyleft.no/mailman/listinfo/pyrex

--===============1804132447==--