[IronPython] Problem Loading DirectX?
Clay Culver
clay at bitshifters.org
Wed Jun 14 07:27:55 PDT 2006
Ahhh ok, thanks. Sorry, I was being very dense that day. Things are
working great now.
Dino Viehland wrote:
> You want to either do a clr.AddReference* (ByPartialName, or one of the other variants), or use the returned assembly object returned from the Load functions.
>
> If you use AddReference then the import statement will work as you have it here. If you just use the returned assembly object, you'll want something like:
>
>
>>>> dx = clr.LoadAssemblyByPartialName("Microsoft.DirectX")
>>>> x = dx.Microsoft.DirectX
>>>>
>
> x is now the DirectX namespace, and you can access types out of it using x.SomeType()
>
> -----Original Message-----
> From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Clay Culver
> Sent: Sunday, June 11, 2006 6:52 PM
> To: users at lists.ironpython.com
> Subject: [IronPython] Problem Loading DirectX?
>
> I'm having a problem loading DirectX (MDX) 2.0. Here is what I am trying:
>
> >>> import clr
> >>> clr.LoadAssemblyByPartialName("Microsoft.DirectX")
> Microsoft.DirectX, Version=2.0.0.0, Culture=neutral,
> PublicKeyToken=31bf3856ad364e35
> >>> import Microsoft.DirectX
> Traceback (most recent call last):
> File , line 0, in <stdin>##17
> File , line 0, in __import__##4
> ImportError: cannot import DirectX from Microsoft
>
> Does anyone know what is wrong with this?
>
> Thanks!
>
> _______________________________________________
> users mailing list
> users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
> _______________________________________________
> users mailing list
> users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/users-ironpython.com/attachments/20060614/6a374334/attachment.htm
More information about the users
mailing list