Re: continuosly calling the function from winelib failing - stackoverflow

2005-12-26 Thread Ananth M
Hi All
    Thank you for the responce
 I am able to solve the problem and the problem is due to the calling convention .
    
 Thank you all once again 

On 12/26/05, Dmitry Timoshkov <[EMAIL PROTECTED]> wrote:
Ananth M <[EMAIL PROTECTED]> wrote:>   - Stub function is declared in X_dll.h as>   long __stdcall STUB_Add(long, long);>   -Stub function is defined  in X_main.c as
>   long __stdcall STUB_Add(long x, long y)>   {>  printf
("stub function is called \n");>  return
0;>   }>>   In one Application , I used>  LoadLibrary("X.dll.so")
- to load the dll>  GetProcAddress("")
- to get the function pointer>and
if I call the function continuously in a loop of for 1000> times, first 2 calls are success 3rd call  is crashedHow do you define a function pointer? Does it have proper number of arguments/calling convention? If it looks OK to you but still crashes, perhaps you could
create a sample project which shows the problem and post an url for it here?--Dmitry.



Re: continuosly calling the function from winelib failing - stackoverflow

2005-12-26 Thread Dmitry Timoshkov

Ananth M <[EMAIL PROTECTED]> wrote:
  
  - Stub function is declared in X_dll.h as  
  long __stdcall STUB_Add(long, long);
  -Stub function is defined  in X_main.c as  
  long __stdcall STUB_Add(long x, long y)

  {
 printf ("stub function is called \n");
 return 0;
  }

  In one Application , I used 
 LoadLibrary("X.dll.so") - to load the dll

 GetProcAddress("") - to get the function pointer
   and if I call the function continuously in a loop of for 1000
times, first 2 calls are success 3rd call  is crashed


How do you define a function pointer? Does it have proper number of arguments/
calling convention? If it looks OK to you but still crashes, perhaps you could
create a sample project which shows the problem and post an url for it here?

--
Dmitry.