Click here to Skip to main content
15,891,529 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Fixed Length Records Pin
Tomasz Sowinski9-Sep-02 4:37
Tomasz Sowinski9-Sep-02 4:37 
GeneralRe: Fixed Length Records Pin
crusherwright9-Sep-02 5:28
crusherwright9-Sep-02 5:28 
GeneralRe: Fixed Length Records Pin
Tomasz Sowinski9-Sep-02 5:46
Tomasz Sowinski9-Sep-02 5:46 
GeneralRe: Fixed Length Records Pin
crusherwright9-Sep-02 5:49
crusherwright9-Sep-02 5:49 
GeneralNeed Urgent HELP on DAO Jet 4.0 distribution Pin
Anonymous9-Sep-02 4:19
Anonymous9-Sep-02 4:19 
GeneralNetMessageBufferSend question Pin
Tom Wright9-Sep-02 4:16
Tom Wright9-Sep-02 4:16 
GeneralRe: NetMessageBufferSend question Pin
Tom Wright9-Sep-02 4:45
Tom Wright9-Sep-02 4:45 
GeneralRe: NetMessageBufferSend question Pin
Stephen C. Steel9-Sep-02 7:32
Stephen C. Steel9-Sep-02 7:32 

The problem is the unecessary & to take the address of the CString object. If you only need read access to the string data in a CString object, you can use the (LPCTSTR) conversion operator to get a pointer to the buffer. Then you'll have to use a cast, because NetMessageBufferSend() expects an LPBYTE rather than an LPCTSTR. That is, change
(LPBYTE)&buffer,
to
(LPBYTE)(LPCTSTR) buffer,

Casting away the constness of the LPCTSTR doesn't matter in this case, since NetMessageBufferSend () is only going to read the buffer.


Stephen C. Steel
Kerr Vayne Systems Ltd.


GeneralRe: NetMessageBufferSend question Pin
Tom Wright9-Sep-02 10:37
Tom Wright9-Sep-02 10:37 
GeneralRe: NetMessageBufferSend question Pin
Daniel Lohmann9-Sep-02 12:50
Daniel Lohmann9-Sep-02 12:50 
GeneralRe: NetMessageBufferSend question Pin
Tom Wright9-Sep-02 12:55
Tom Wright9-Sep-02 12:55 
GeneralMemory access at run time Pin
SamirSood9-Sep-02 2:40
SamirSood9-Sep-02 2:40 
GeneralRe: Memory access at run time Pin
Vagif Abilov9-Sep-02 2:51
professionalVagif Abilov9-Sep-02 2:51 
GeneralRe: Memory access at run time Pin
Pavel Klocek9-Sep-02 2:54
Pavel Klocek9-Sep-02 2:54 
GeneralRe: Memory access at run time Pin
SamirSood9-Sep-02 3:46
SamirSood9-Sep-02 3:46 
GeneralRe: Memory access at run time Pin
Todd Jeffreys9-Sep-02 16:21
Todd Jeffreys9-Sep-02 16:21 
General#define vs. const Pin
Alexandru Savescu9-Sep-02 2:31
Alexandru Savescu9-Sep-02 2:31 
GeneralRe: #define vs. const Pin
Pavel Klocek9-Sep-02 2:35
Pavel Klocek9-Sep-02 2:35 
GeneralRe: #define vs. const Pin
Alexandru Savescu9-Sep-02 2:40
Alexandru Savescu9-Sep-02 2:40 
GeneralRe: #define vs. const Pin
Tomasz Sowinski9-Sep-02 2:39
Tomasz Sowinski9-Sep-02 2:39 
GeneralRe: #define vs. const Pin
Alexandru Savescu9-Sep-02 2:43
Alexandru Savescu9-Sep-02 2:43 
GeneralRe: #define vs. const Pin
Tomasz Sowinski9-Sep-02 2:48
Tomasz Sowinski9-Sep-02 2:48 
GeneralRe: #define vs. const Pin
Jawache9-Sep-02 3:00
Jawache9-Sep-02 3:00 
GeneralRe: #define vs. const Pin
Joaquín M López Muñoz9-Sep-02 3:30
Joaquín M López Muñoz9-Sep-02 3:30 
GeneralRe: #define vs. const Pin
Alexandru Savescu9-Sep-02 3:42
Alexandru Savescu9-Sep-02 3:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.