Solved

CreateProcess Function for Visual C++

Posted on 1998-04-11
5
206 Views
Last Modified: 2010-04-10
I am writing a program that needs to send a message to a user with a message I type in.  I don't mind using the net send function, but need to know how to send the user and message to it, also if I go this route, I want the command window that pops up to be minimized.  However, I would rather not use this process.  How can this be accomplished?
0
Comment
Question by:york040598
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
5 Comments
 
LVL 11

Accepted Solution

by:
alexo earned 100 total points
ID: 1184217
Under NT, check the function NetMessageBufferSend().  Note that all the strings are uincode!
Under 95, I'm affraid you'll have to CreateProcess() with "net send".
0
 
LVL 11

Expert Comment

by:alexo
ID: 1184218
Wow!  Shitty memory...
There's a way that works for noth 95 and NT.

1. Open mailslot (using CreateFile() call) named \\<computer>\mailslot\messngr
    Where <computer> is the name of computer to receive the message (can also
be workgroup or domain name).

2. Write your message to the mailslot (using WriteFile() call) in this form: <from>\0<to>\0<text>
    <from> is the name of messsage sender,
    <to> is the name of recipient (in fact any text you wish, WinPopup displays these pieces of text in message title bar).
    Note the zero bytes separating 3 parts of the message!

3. Close the mailslot.

0
 
LVL 11

Expert Comment

by:alexo
ID: 1184219
Also, the recepient has to run winpopup (Win3.x, Win95) or the messenger service (NT).  That is also true for the regular "net send".
0
 

Author Comment

by:york040598
ID: 1184220
The problem with the latter suggestions is that it seems I must know the computer I am send to.  Rather than a logged in user like net send does.  
0
 
LVL 11

Expert Comment

by:alexo
ID: 1184221
york, I'm sorry I didn't respond earlier (lost the reference to the question).

You can go low level and use Netbios() to send a message to a user name (that's what NET SEND does).  However, NetBios programming takes getting used to...

0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question