Kbase P69499: Is there any MemPtrToString function for .Net Open Client in the Memptr Class (Progress.Open4GL.Memp
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  04/10/2005 |
|
Status: Unverified
GOAL:
Is there any MemPtrToString function for .Net Open Client in the Memptr Class (Progress.Open4GL.Memptr)
GOAL:
Is there any StringToMemPtr function for .Net Open Client in the Memptr Class (Progress.Open4GL.Memptr)
GOAL:
Example of how to implement a MemPtrToString function when passing a MEMPTR between Progress and a .NET client
FACT(s) (Environment):
OpenEdge 10.0A
FIX:
No. This has not been implemented. Enhancement Request# 20040227-002 has been logged.
See below a sample code allowing to do it:
protected XmlDocument MemPtrToString(Progress.Open4GL.Memptr memPtrIn)
{
ASCIIEncoding encoding = new ASCIIEncoding( );
return encoding.GetString(memPtrIn.Bytes);
}
protected Progress.Open4GL.Memptr StringToMemptr(string stringIn)
{
ASCIIEncoding encoding = new ASCIIEncoding( );
Progress.Open4GL.Memptr memPtrOut = new Memptr(encoding.GetBytes(stringIn));
return memPtrOut;
}