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

[REBOL] Re: Problem with routine!

From: volker::nitsch::gmail::com at: 9-Mar-2005 18:36

On Wed, 09 Mar 2005 04:44:48 -0800, Bohdan or Rosemary Lechnowsky <[amicom--sonic--net]> wrote:
> 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 *); >
What is a CString? Is it a MS-class with pointer, length and such stuff, not just a char* ? Can you look into that from a c-debugger?
> Any ideas you can give would be greatly appreciated! > > -Bo > > -- > No virus found in this outgoing message. > Checked by AVG Anti-Virus. > Version: 7.0.308 / Virus Database: 266.7.0 - Release Date: 3/8/2005 > > -- > To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject. >
-- -Volker Any problem in computer science can be solved with another layer of indirection. But that usually will create another problem. David Wheeler