Thread overview | ||||||
---|---|---|---|---|---|---|
|
October 20, 2006 Direct3DCreate9 from static library? | ||||
---|---|---|---|---|
| ||||
I did the following: I made an import library for d3d9.dll with one export _Direct3DCreate9@4 = Direct3DCreate9 Now, every time I call the function, I get a Win32 exeption. I just want to know why. |
October 20, 2006 Re: Direct3DCreate9 from static library? | ||||
---|---|---|---|---|
| ||||
Posted in reply to LW | LW wrote:
> I did the following:
> I made an import library for d3d9.dll with one export
> _Direct3DCreate9@4 = Direct3DCreate9
>
> Now, every time I call the function, I get a Win32 exeption.
> I just want to know why.
Did you call CoInitialize before calling the DirectX function ?
|
October 20, 2006 Re: Direct3DCreate9 from static library? | ||||
---|---|---|---|---|
| ||||
Posted in reply to dickl | No, I didn't. But now it works without it! I forgot the "return" and the compiler didn't complain, because I had a "return E_FAIL" in an if-block |
October 21, 2006 Re: Direct3DCreate9 from static library? | ||||
---|---|---|---|---|
| ||||
Posted in reply to dickl | dickl wrote:
> LW wrote:
>> I did the following:
>> I made an import library for d3d9.dll with one export
>> _Direct3DCreate9@4 = Direct3DCreate9
>>
>> Now, every time I call the function, I get a Win32 exeption.
>> I just want to know why.
>
> Did you call CoInitialize before calling the DirectX function ?
Not needed when using the *Create functions of DirectX. You only need CoInitialize when loading manually through the COM interface. The *Create functions are essentially wrappers for that.
|
Copyright © 1999-2021 by the D Language Foundation