From: Bama Test Date: 2006-05-25T01:35:06+09:00 Subject: Ruby / DL problem --0-1784382690-1148488503=:15286 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit I've got a DLL that I'm working on interfacing to - i've got everything working except for this one function. int CreateDataFile ( const char* csUserID, const char* chOptionalTemplateFilePath, const char* csPrefix, const char* csSuffix, char*& newFileID); the problem is with the newFileID parameter - it's defined as "points to the buffer that receives the string of the File ID created. Maximum length of this buffer is 20 bytes." I've tried defining the call as both @createfile = msg["CreateDataFile", "ISSSSP"] and @createfile = msg["CreateDataFile", "ISSSSS"] and then passing in the values like this x = "" ptr = DL.malloc(20) a = @createfile.call('eldon',x,x,x,ptr) the function runs successfully but I can't ever retrieve the value of the FileID created from ptr and from what I can tell It still looks empty. So I figure I must either be defining it incorrectly or passing it in the call wrong. From my memory of C the & is actually a pointer to a memory location, but there seems something in my memory that it might mean something different when referenced like this (it's been like 10 years since i did anything in C) and I've done a ton of google searches already. Any guesses as to what i might be doing wrong? Thanks Eldon __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --0-1784382690-1148488503=:15286--