From: awertyui@... Date: 2005-09-15T03:01:34+09:00 Subject: Re: Help finding a leak Thanks for your help everything almost works now. The only problem I have now is that it seems that there is no to_ptr method in ruby/dl2 so how do I pass a ptr to a function that takes a string and changes the string? I tried using CPtr but I'm not to sure how to use it. here is the DL extern setup for the function extern 'ATOM GlobalGetAtomName(ATOM,PVOID,int)' Here is what I had and it worked with the old DL. tmp = "".ljust(256,"NO-CHANGE") z1 = tmp.to_ptr if(msg == @MessageRequestComplete) MyWin32.globalGetAtomName(lparam,z1,255) puts z1.to_s end Here is what im trying with DL2 tmp = "".ljust(256,"NO-CHANGE") if(msg == @MessageRequestComplete) MyWin32.GlobalGetAtomName(lparam,tmp,255) puts tmp end