Personal info for charliebloom

Name: charlie bloom

No personal information is available.

Recent diary entries for charliebloom:
RSS

12 Oct 2004 (updated 12 Oct 2004)  »

I have ported the vb code to use ghostscript to c#. I replaced the string routines with more efficient code. How do I upload it?

Here is a procedure to get string value from gsdll_stdout and gsdll_stderr call back.

private string GetStdString(IntPtr strz, int intBytes)

{

if(intBytes != 0)

{

byte[] buffer = new byte[intBytes];

GCHandle gcByte = GCHandle.Alloc(buffer, GCHandleType.Pinned);

IntPtr ptrByte = gcByte.AddrOfPinnedObject();

CopyMemory(ptrByte, strz, intBytes);

ptrByte = IntPtr.Zero;

gcByte.Free();

return Encoding.ASCII.GetString(buffer);

}

return string.Empty;

}

Others have certified this person as follows:

[ Certification disabled because you're not logged in. ]

[ Home | Articles | Account | People | Projects ]