Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Problem with routine!

From: amicom::sonic::net at: 9-Mar-2005 4:44

OK. I finally made some progress on my video capture .dll stuff, but I'm stuck again. Here is the C++ code that works properly calling the routine grabframe : char *pFrame = NULL; long frameSize; HANDLE h; char *fn = new char[256]; char *pTyped; long frameSizeTyped; DWORD bytesWritten; LPDWORD pBytesWritten = &bytesWritten; pFrame = grabFrame("This is me", &frameSize); I think this can safely be whittled down to the following for this example: char *pFrame = NULL; long frameSize; pFrame = grabFrame("This is me", &frameSize); Here is my grabframe routine in Rebol: grabframe: make routine! [ "Grab a video frame" t1 [string!] addr [integer!] return: [string!] ] tfcapture "grabFrame" If I try to call it with the following, Windows says Rebol generated an illegal operation: adrs: 0 res: grabframe "Test" adrs Here is the grabframe declaration in the .h file if this helps any: extern "C" __declspec(dllexport) char *grabFrame(CString, long *); Any ideas you can give would be greatly appreciated! -Bo