C
Chua Wen Ching
Okay i stuck with something.
This is more to c# rather than Directx! Just want to
clarify it first.
Right now, i am using a game engine which provide a
function to get buffer for my input.
Code:
=====
Input.GetKeyBuffer(ret_KeyData() As ENGINE_KEYDATA,
ret_DataNumber As Long) // the API
But this code works fine in VB6 and VB.NET
so i do this
ENGINE_KEYDATA[] buffer = new ENGINE_KEYDATA[255]; // An
array of 255
ENGINEInputEngine Input = new ENGINEINPUTEngine(); //
Input API for the Engine
int numberOfEvents;
Input.GetKeyBuffer(ref buffer, ref numberOfEvents);
Must ref, or else got bugs.
So i get compile errors:
================
C:\FallenDemo\Edit Box\Form1.cs(200): The best overloaded
method match for 'ENGINE._ENGINEInputEngine.GetKeyBuffer
(ref System.Array, ref int)' has some invalid arguments
C:\FallenDemo\Edit Box\Form1.cs(200): Argument '1': cannot
convert from 'ref ENGINE.ENGINE_KEYDATA' to 'ref
System.Array'
The funny part is that why is vb6 and vb.ent can compile
and see the output and not in C#?
Any help to fix this problem?
It is supposed to expect a keydata rather than
System.Array!
I know the another alternative is code my own getbuffer
using Directx... but kind of troublesome...
ENGINE is my engine name, and when i used it, i add
references to COM for that engine...
Please help!
Regards,
Chua Wen Ching![Stick Out Tongue :p :p](/styles/default/custom/smilies/tongue.gif)
This is more to c# rather than Directx! Just want to
clarify it first.
Right now, i am using a game engine which provide a
function to get buffer for my input.
Code:
=====
Input.GetKeyBuffer(ret_KeyData() As ENGINE_KEYDATA,
ret_DataNumber As Long) // the API
But this code works fine in VB6 and VB.NET
so i do this
ENGINE_KEYDATA[] buffer = new ENGINE_KEYDATA[255]; // An
array of 255
ENGINEInputEngine Input = new ENGINEINPUTEngine(); //
Input API for the Engine
int numberOfEvents;
Input.GetKeyBuffer(ref buffer, ref numberOfEvents);
Must ref, or else got bugs.
So i get compile errors:
================
C:\FallenDemo\Edit Box\Form1.cs(200): The best overloaded
method match for 'ENGINE._ENGINEInputEngine.GetKeyBuffer
(ref System.Array, ref int)' has some invalid arguments
C:\FallenDemo\Edit Box\Form1.cs(200): Argument '1': cannot
convert from 'ref ENGINE.ENGINE_KEYDATA' to 'ref
System.Array'
The funny part is that why is vb6 and vb.ent can compile
and see the output and not in C#?
Any help to fix this problem?
It is supposed to expect a keydata rather than
System.Array!
I know the another alternative is code my own getbuffer
using Directx... but kind of troublesome...
ENGINE is my engine name, and when i used it, i add
references to COM for that engine...
Please help!
Regards,
Chua Wen Ching
![Stick Out Tongue :p :p](/styles/default/custom/smilies/tongue.gif)