|
I wrote a soap server COM. now I want to get the client's IP address.
how can I do?
|
|
|
|
|
|
Use Bitmap::GetHBITMAP() then call GetObject() with the handle that's returned. Use this to get the dimensions and then call GetBitmapBits() using an array of the correct size.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Joe Woodbury: I have used the method that you said,but I can't display the picture by using opel glDrawPixels(). why?
|
|
|
|
|
I have no idea.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Check out the Bitmap class on MSDN
check out the LockBits method.
Thank You
Bo Hunter
|
|
|
|
|
Thank Joe Woodbury and Bo Hunter,I will try them.
|
|
|
|
|
HI all
Ive been playing withthis autoplay "thing" which allows us to choose which application to use when say removable media is inserted into our pc.
I have set the registry up and the application is fired up nicely when the user selects it (after media insertion)
According to this article http://msdn.microsoft.com/msdnmag/issues/01/11/autoplay/default.aspx[^]
If the application registered for IDropTarget (new to Windows XP), then all the files that were sniffed will be passed to the application through the IDataObject interface.
what i am having difficulties with is figuring out exactly what i need to do to my app to register for this and i was wondering if anyone had any suggestions or even better had an working examples
regards
Bryce
---
Publitor, making Pubmed easy.
http://www.sohocode.com/publitor
|
|
|
|
|
bryce wrote:
IDropTarget (new to Windows XP),
Sorry I am not helping, but the the above statement is incorrect; either that or the IDropTarget I have used over the years does not realy exist.
INTP
|
|
|
|
|
well i dunno, thats a copy and paste from the article and microsoft wouldn't lie would they?
bryce
---
Publitor, making Pubmed easy.
http://www.sohocode.com/publitor
|
|
|
|
|
:-DEvery article in from microsoft has to be taken with a grain of salt.
Always take note of the keywoards they use and search on those. The odds are that there was a previous article on the same subject. One thing that microsoft tends to be good at is redundency.
I am always surprised when I have to go back to the help system for Win3.1 in order to find out what the hell they are talking about.
Note the IDropTarget under requirement:
Windows NT/2000: Requires Windows NT 3.1 or later. (XP did not exist yet)
Windows 95/98: Requires Windows 95 or later. (XP did not exist yet)
Windows CE: Unsupported.
Header: Declared in oleidl.h.
INTP
|
|
|
|
|
For example, I want to launch the below file.
C:\Windows\Tasks\Low Battery Alarm Program.job
What function can I use to launch this file in VC++ ?
Jesa
|
|
|
|
|
Is it launched by just double clicking on it?
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Dear Papa and DavidCrow,
It can be launched by just double clicking on it.
But I can't launch the dialog by using system(),ShellExecute(),WinExec(), or CreateProcess().
In NoteBook platform, we can launch the dialog by the below procedure:
1. Lauch the "Power Options Properties" in control panel.
2. Select the "alarms" page.
3. Click the "alarm action" button.
4. Check the "Run a Program" checkbox.
5. Click "Configure Program" button.
Is there any other way to do it??
Jesa
|
|
|
|
|
If it has an associated application, then just use ShellExecute() .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi, I have downloaded DirectX 9 SDK but when I try to use dx9err in my code, compiler gives an error: "Cannot open include file: 'dx9err.h': No such file or directory"
I have checked - there is dx9err.h, so I asume that there is no dx9err.cpp or dll, or something, as references to other header files in same directory don't raise compiler error.
Qusetion: Do I have to download dx9err separately or there is just mess in SDK documentation? I'm using VS .NET 2003.
Thanks.
|
|
|
|
|
More of an algorithm question than a C++ question, but here goes anyway:
A sequence of numbers needs to be plotted as a graph on the screen. There are many more numbers than pixels available, therefore the current implementation "compresses" groups of numbers so that it can represent each group as a single pixel.
eg:
Assume the following trivial sequence of numbers:
{ 1, 2, 3, 3, 2, 1, 1, 2, 3 }
Also assume that I only have 3 available pixels in which to display these values, such that:
pixel 0 = { 1, 2, 3 }
pixel 1 = { 3, 2, 1 }
pixel 2 = { 1, 2, 3 }
What is the best way to get a "best fit" of the numbers, so that the graph retains as much of its meaning as possible?
As far as I see it, I can take the minimum, maximum or average values of each group, but this is not always useful. For example, given the above groupings, I will end up with a flat line graph, which is obviously not representative of the data!
As I mentioned above, the software already exists to do this, but the results are not always satisfactory and are occasionally outright misleading. I really need a good algorithm that will retain as much of the "shape" of the graph as possible.
Thanks for any help!
|
|
|
|
|
Actually, in terms of MSE the average *is* the best option. It's an unfortunate example which you brings, but the general case favors the average.
I can make another suggestion, if it's acceptable: plot *3* graphs: average, mix, and max. For each "pixel" plot in one color the min, in another the max, and in a 3rd color the average of the "group" of values which that pixel represents.
That way you'll get a better feel, I believe.
-- Nitzan
|
|
|
|
|
Consider pairs of pixels.
Look at the data that is mapped onto two pixels and search for minimum and maximum.
Put the one that comes first into the first pixel, the other into the second pixel.
This way "noisy" data will look noisy.
HTH
Henrik
|
|
|
|
|
Text in a CStatic control, which is on CFormView (SDI app), gets erased after CPropertySheet dialog ends. Dialog is called from the menu. Does anyone knows what's the reason for such behaviour and how to prevent it?
|
|
|
|
|
Override OnActiveView() or OnSetFocus(), etc. and refresh the static control.
Kuphryn
|
|
|
|
|
How synchronised contact of outlook with an access application?
thanks
|
|
|
|
|
I'm developing a pkg in Visual C++ that will need to have a unique serial number for each copy of the software sent out. The program needs to be aware of its serial number, and it needs to be stored in a place somewhat inaccessible to hinder tampering.
The "brute force" method would be to manually change a #define in the code and recompile before each delivery of each copy of the software. Totally unworkable. Does anyone know of a way to do this? I thought of somehow automatically editing the .rc file, but that gets folded in at compile time, so that won't work, either. I need a clever idea....
Thanks!
|
|
|
|
|
In the dim and distant past when I was creating Novell Netware NLMs I did something like,
struct SerialNumber
{
char sentinel [ 33 ] ;
char serialno [ 33 ] ;
} ;
SerialNumber TheSerialNumber = { "That'll be the day, when you mak",
"00000000000000000000000000000000" } ; Put that somewhere in static space, then write a separate application that searches the exe for the sentinel string (ensure there's only one instance if you're paranoid....) and sets the serial no to whatever is desired.
I'd suggest encoding the serial on the way in and way out, this can be something fairly trivial, and perhaps using a likely looking error message as the 'sentinel'.
Paul
|
|
|
|
|
Thanks, Paul! That may just be the ticket! I need to create a separate exe anyhow, to automate serial number creation in the first place, so this should work nicely.
Thanks again!
|
|
|
|