|
hello.here is a short description of my problem:i'm
working on a game engine.so i have 2 lua states:
1.renderer-here i've registred the functions of a
c++ object wich is creating and running an opengl window.this object is
implemented in a dll.i use a function to retrieve the hwnd field of the
object(the handle to the window) in this state as a userdata value.
2.input-here i've registred the functions from a
c++ object wich is initializing and running direct input specific jobs(creating
and acquiring devices).this object is implemented in another dll and here i have
a global variable hwnd(a handle).
the problem is:i pass the value from renderer to
input through a function that i've made(it works on numbers and strings-i've
checked) and then i call a function set_hwnd to set the hwnd variable from the
input dll to the value from the renderer state.but i get an error at setting
cooperative level , wich is the first line in the input dll where i use the hwnd
value.well i want to ask u to help me if there is a problem with my hwnd or
there may be other problem and i don't see it and how to solve them, in spite of
their nature.
i'm looking forward for your
help.thanks
|