DLL fun

Rui-Tao Dong rdong@newport.com
Sun Jan 31 23:52:00 GMT 1999


I decided to have some fun with the Dlltool.  I converted Matrox
framegrabber dll (MIL-lite) into unix archives and linked them into
code with Lesstif GUI.  I can now test and debug my application
remotely.  I am using VNC as my X-server which does not have shared
memory support.  Therefore, the live update is very slow.  This is
still way better than running MSVC debugger.

However, I have one minor problem.  Everytime the framegrabber pops up
an error message, it goes to the machine with the framegrabber not to
my local PC.  I tried to do something like

int __attribute__((stdcall)) MessageBoxA(int handle, char* msg, char* title, int type)
{
  fprintf(stderr, "%s: %s\n", title, msg);
  return 0;
}

int __attribute__((stdcall)) MessageBoxW(int handle, char* msg, char* title, int type)
{
  fprintf(stderr, "%s: %s\n", title, msg);
  return 0;
}

int __attribute__((stdcall)) MessageBoxExA(int handle, char* msg, char* title, int type, int word)
{
  fprintf(stderr, "%s: %s\n", title, msg);
  return 0;
}

int __attribute__((stdcall)) MessageBoxExW(int handle, char* msg, char* title, int type, int word)
{
  fprintf(stderr, "%s: %s\n", title, msg);
  return 0;
}


and link the module after the Matrox library.  It links OK, but error
message still pops up on the other machine.  For this particular
application, I can probably find otherways to get around this.  But is 
this doable in general?

-- 
Regards,

	Rui-Tao Dong			Newport Corporation
	rdong@newport.com		1791 Deere Avenue
	(949)253-1679(Voice)		Irvine, CA 92606 USA
	(949)253-1240(Fax)		http://www.newport.com

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".



More information about the Cygwin mailing list