Click here to Skip to main content
15,920,633 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: whats wrong with this? Pin
Mazdak5-Apr-02 0:19
Mazdak5-Apr-02 0:19 
GeneralRe: whats wrong with this? Pin
Christian Graus5-Apr-02 0:30
protectorChristian Graus5-Apr-02 0:30 
GeneralRe: whats wrong with this? Pin
Mazdak5-Apr-02 0:59
Mazdak5-Apr-02 0:59 
GeneralRe: whats wrong with this? Pin
Mazdak5-Apr-02 1:46
Mazdak5-Apr-02 1:46 
GeneralRe: whats wrong with this? Pin
Christian Graus5-Apr-02 9:57
protectorChristian Graus5-Apr-02 9:57 
AnswerRe: whats wrong with this? Pin
Jon Hulatt5-Apr-02 5:51
Jon Hulatt5-Apr-02 5:51 
GeneralRe: whats wrong with this? Pin
Mazdak5-Apr-02 6:11
Mazdak5-Apr-02 6:11 
GeneralNetmessagebuffersend(): this is strange! Pin
Jörg Anslik4-Apr-02 21:42
Jörg Anslik4-Apr-02 21:42 
Hi,

I wrote a little tool for our current project here that automatically sends off messages to selected users using NetMessageBufferSend(). It works okay
when I sent off messages from my Win2000 system...every recipient gets the message. What's strange, the tool doesn't work on NT5.0 (SP6) machines -- I always get "NERR_NameNotFound" errors. I tried different ways to convert the relevant strings to UNICODE, but none of these does the trick:

(1)
#define MESGLEN 50000
WCHAR awcToName[MESGLEN*2];
ZeroMemory( awcToName, sizeof(WCHAR)*MESGLEN);
MultiByteToWideChar( CP_ACP, 0, strEmpf, strEmpf.GetLength(), awcToName, MESGLEN);

(2)
wchar_t name[256];
mbstowcs(name,strEmpf,256);
name[256 - 1] = L'\0';

(3)
_towchar(strEmpf) from TConvert.h written by Zoran M.Todorovic

Anyway, launching the usual "net send ..." from a CMD window works on the NT machines, so all required services, etc. seem to be up and running, so I believe it's a string converting problem, although I cannot see where the error might be, since any of the routines (1) - (3) mentioned above work perfectly under W2K.

Any suggestions anyone? I'd really appreciate your help with this.

Thanx in advance

--j

-----------------------------------------
There are three kinds of people:
Those who can count and those who cannot.
GeneralDirectShow StillCap problem Pin
Ruzicka4-Apr-02 21:37
Ruzicka4-Apr-02 21:37 
Generalbasic_string Pin
Niklas L4-Apr-02 21:37
Niklas L4-Apr-02 21:37 
GeneralRe: basic_string Pin
Niklas L4-Apr-02 21:39
Niklas L4-Apr-02 21:39 
GeneralRe: basic_string Pin
Joaquín M López Muñoz4-Apr-02 22:32
Joaquín M López Muñoz4-Apr-02 22:32 
GeneralRe: basic_string Pin
Joao Vaz4-Apr-02 23:49
Joao Vaz4-Apr-02 23:49 
GeneralRe: basic_string Pin
Tim Smith5-Apr-02 3:48
Tim Smith5-Apr-02 3:48 
GeneralRe: basic_string Pin
Joao Vaz5-Apr-02 4:56
Joao Vaz5-Apr-02 4:56 
GeneralRe: basic_string Pin
Joaquín M López Muñoz5-Apr-02 5:40
Joaquín M López Muñoz5-Apr-02 5:40 
GeneralRe: basic_string Pin
Joao Vaz5-Apr-02 6:03
Joao Vaz5-Apr-02 6:03 
GeneralRe: basic_string Pin
Niklas L5-Apr-02 1:12
Niklas L5-Apr-02 1:12 
GeneralPLEASE HELP ME Pin
cycosi4-Apr-02 21:12
cycosi4-Apr-02 21:12 
GeneralRe: PLEASE HELP ME Pin
Mazdak4-Apr-02 21:27
Mazdak4-Apr-02 21:27 
GeneralRe: PLEASE HELP ME Pin
Christian Graus4-Apr-02 21:37
protectorChristian Graus4-Apr-02 21:37 
GeneralRe: PLEASE HELP ME Pin
cycosi4-Apr-02 22:41
cycosi4-Apr-02 22:41 
GeneralRe: PLEASE HELP ME Pin
Christian Graus4-Apr-02 22:58
protectorChristian Graus4-Apr-02 22:58 
GeneralRe: PLEASE HELP ME Pin
Tomasz Sowinski5-Apr-02 6:02
Tomasz Sowinski5-Apr-02 6:02 
GeneralVery Basic Question. Pin
Mazdak4-Apr-02 20:14
Mazdak4-Apr-02 20:14 

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.