Hi! thanks! but this is to complex for me, I speak from pointers to a string, allocated with new, I can't imagine that they have address LT 1000, but ... Regards
Frigyes Nagy
Posts
-
Pointer address -
Pointer addressHi! thanks! but LPSTR is also a pointer to a null-terminated string This type is declared in Winnt.h as follows: typedef CHAR *LPSTR;
void DrawDFText( LPSTR a) { sprintf(szBuf, "address: %d ", a); };
works for me... Regards Frigyes -
Pointer addressHi! I know, this is not really pretty, but it's works, and I never find any pointer address less then 1000. (this is one DLL for my DATAFLEX program, I don't like to export 3 procs, if I can make the same work with a ugly one) Regards and sorry my english Frigyes
-
Pointer addressHi Magnus! many thanks for your answer! > ... there is no need to know that value since you should never test it but I must test it, if I call my Drawtext procedure with 1 should start BeginPaint, if I call with 2 should start EndPaint, if NULL it's a error, otherwise should be draw the text from the pointer, (the procedure is a DLL procedure, and I can't use too many parameters) can be the address from one pointer 1 or 2 ?
void __declspec(dllexport) DrawDFText( LPSTR a) { ... } and call like: DrawDFText(1); DrawDFText("line1"); DrawDFText("line2"); ... DrawDFText(2);
Regards! Frigyes -
Pointer addressHi! what is the smallest pointer address? I think a pointer is never 1,2 (or 3) to example :
void DrawDFText( LPSTR a) UINT i = (UINT) a; if ( i > 2 ) { TCHAR szBuf[180]; wsprintf(szBuf, "address:%d ", a ); OutputDebugString( szBuf ); return; }; if ( i == 1 ) dothat1; if ( i == 2 ) dothat2;
it's right? Regards! Frigyes :confused: