Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2005 Aug : Convertin C++ Code to Delphi

www.cryer.info
Managed Newsgroup Archive

Convertin C++ Code to Delphi

Subject:Convertin C++ Code to Delphi
Posted by:"Gürcan YÜCEL" (gyuc..@g-gsoft.com)
Date:Wed, 31 Aug 2005 17:39:15 +0300

Hi,
Im trying to write a plugin DLL for a printing system. The example comes in
C++ language and I cant convert it to delphi. Is there anybody can help me
to convert it to pascal?

Thanks

#define MY_CUSTOM_DATA_SIZE 1024 * 100 // 100K.

BOOL __stdcall
BiStartDoc( BlackIceDEVMODE* pDevmode, void** ppCustomData,  unsigned long
*pdwCustomDataSize)        -->Actually BlackIceDEVMODE is LongInt
{
void *pMyData;  // Pointer to my data buffer
DWORD dwMyDataSize; // The size of the data buffer in bytes

OutputDebugString(TEXT("BiPlugIn.dll: BiStartDoc called.
"));

pMyData = GlobalAlloc(GPTR, MY_CUSTOM_DATA_SIZE);
if (!pMyData)
  return FALSE;
// Specify the size of the data
dwMyDataSize = MY_CUSTOM_DATA_SIZE;

// return a pointer to my data and to the data size
*ppCustomData  = pMyData;
*pdwCustomDataSize = dwMyDataSize;
return TRUE;
}

Info

Glossary

File Types

Replies:

www.cryer.info
Managed Newsgroup Archive