|
POP3 is actually quite easy. You just connect a socket and send some text commands, then retrieve the returned text.
Check out www.rfc.net for the actual specifications.
|
|
|
|
|
I have an array of numbers say array[0]=-10, and array[1]=23. Furthermore, lets say that they represent a most significant bit, and a least significant bit, so in reality the number is
-1023. How do I combine both elements of the array into a signed integer that I can store??
Regards
Mike Zolna
|
|
|
|
|
|
Thanks, but what if the number is 102 and not 1023, that wont work. I dont know that magnitude of the numbers until they are joined together
Mike
|
|
|
|
|
I don't know what your program is like, so it's hard to say. But if you don't know what the final result should look like, then you won't be able to calculate the final result. You'll need some sort of separate indicator to tell you how the result is split up among the array elements.
--Mike--
http://home.inreach.com/mdunn/
Time is an illusion; lunchtime doubly so.
|
|
|
|
|
Actually,
The elements of the array are from 0-255, or 00 to FF in hex. I need to combine both bytes and turn them into a signed character for processing.
Regards
Mike
|
|
|
|
|
Well, this is not efficient, but shoudl serve as a starting point for you:
long lResult = 0;
int nMult;
for (int x = 0; x< nNum; x++)
{
nMult = 1;
while (nMult <= nArray[x])
nMult *= 10;
lResult *= nMult;
lResult += nArray[x];
}
Note though that if your array has any significant size then you will overflow the integer you're trying ot store it into.
|
|
|
|
|
If your numbers are in range of -signed char- it`s very easy to combine these numbers to an integer:
int result = ( array[0] << 8 ) + array[1];
This command shifts the number stored in array[0] 8 Bit up (left) and adds the number stored in array[1];
Hope that helps
Greatings Mario ///
--------------------
www.klangwerker.de
rocknix@lycos.de
--------------------
|
|
|
|
|
If your numbers are in range of -signed char- it`s very easy to combine these numbers to an integer:
int result = ( array[0] << 8 ) + array[1];
This command shifts the number stored in array[0] 8 Bit up (left) and adds the number stored in array[1]. Shifting a byte by 8 is equal to a multiplikation with 0xff - but shifting is much faster I think.
Hope that helps
Greatings Mario ///
--------------------
www.klangwerker.de
rocknix@lycos.de
--------------------
|
|
|
|
|
Ok, I'm writing a GUI that takes in data and then when the user clicks on a button it creates a process using CreateProcess() and passes the data input by the user to the spawned child process. The child is a Win32 Console program and I need to be able to read in the output of the Child through a pipe. I tried taking a look at the Example in the MSDN stuff, but it didn't even seem to do anything as far as passing the data back and forth. Could someone give me a few tips or point me to a tutorial? Thanks.
Dave Johansen
|
|
|
|
|
How can i print the info that is in a listbox?
|
|
|
|
|
hmmm...well, let's take a look in the Combo & Listbox section where we find:
CPrintPreviewListBox
A listbox derived class that allows printing and print preview in SDI and MDI applications
Sounds like what you're looking for to me.
|
|
|
|
|
hello all.
I am developing a Messaging server working side by side with Exchange.
I consider developing a WMI interface to my server. if anybody has any thought, experience, or general guide lines (like- DONT DO THAT) plz share...
thanks allot
Noam Ben Haim
noam.benhaim@onsettechnology.com
Noam Ben Haim
Systems Developer
Onset Technology
noam.benhaim@onsettechnology.com
|
|
|
|
|
Im having problems resizing my property sheet to the size of its parent(a dialog bar). IT seems as though the parent rect isnt being obtained correctly or something. Has anyone done this, or something similar and could give me some advice? thanks
~ Chris
|
|
|
|
|
Hi,
does anyboy know how to move a window without a title-bar.
I tried :
case WM_MOUSEMOVE:
if( wParam && MK_LBUTTON )
.
.
.
That works but not fast ... and the grafix ? no comment *g*
Any ideas ?
Greatings Mario ///
--------------------
www.klangwerker.de
rocknix@lycos.de
--------------------
|
|
|
|
|
Handle WM_LBUTTONDOWN, like so:
case WM_LBUTTONDOWN:
PostMessage ( hwnd, WM_NCLBUTTONDOWN, HTCAPTION, lParam );
break;
That "tricks" the window into thinking you clicked on its caption bar (even though there isn't one!).
--Mike--
http://home.inreach.com/mdunn/
Time is an illusion; lunchtime doubly so.
|
|
|
|
|
Works fine - thank you !
Greatings Mario ///
--------------------
www.klangwerker.de
rocknix@lycos.de
--------------------
|
|
|
|
|
Please, what flag have I to use to have a window without caption and borders - I used it month ago but I forgot (
thanx
Mario///
--------------------
www.klangwerker.de
rocknix@lycos.de
--------------------
|
|
|
|
|
|
When I step through my source code when debugging my application (F10),
sometimes the system suddenly hangs.
The only thing I can do is move the mouse pointer and then I'll always have
to reboot my machine.
Has anyone ever experienced the same or know a solution to this annoying problem.
Platform: Win 2000 SP1; VC++6 SP4
Our application is a multithreaded application that also uses ADO.
Thanks in advance.
Geert
|
|
|
|
|
Debugging multihreading-apps can be hard work ... if you want to know more about it take a look in the following book - chapter 15 ( would be to much write it all down here ):
Win32 Multithreaded Programming
O`Reilly
Cohen & Woodring
ISBN 1-56592-296-4
Greatings Mario ///
--------------------
www.klangwerker.de
rocknix@lycos.de
--------------------
|
|
|
|
|
Thanks for the tip.
You don't happen to know any electronical version of that chapter/book?
Does Win2K behaves differently than WinNT for multithreading?
'Cause I don't have the problem (with the same code) on a WinNT machine.
Bye.
Geert.
|
|
|
|
|
I don`t know about an e-book of o`reilly.
I think your problem is not the platform you`re programming on.
The main problem it seems is that you step through one thread while another is running in the back.
This can cause problems during synchronisation that ends in a deadlock.
Greatings Mario //
P.S.: I forgot - There is one difference between Win9x and NT/2k in using WaitForMultipleObject.
If this function succeds the return value in 9x is always 0 while on NT/2k it is the index of the last returning thread/object or whatever ...
--------------------
www.klangwerker.de
rocknix@lycos.de
--------------------
|
|
|
|
|
I had lots of problems after I upgraded from 98SE to 2000. The problem you describe was one of them. I eventually found that I had to replace all the RAM in my system. For some reason 2000 is incredibly picky about RAM and needs A1 quality to run reliably. I have since upgraded 8 other systems of various sorts and half of them needed to have new RAM installed. The symptomps ranged from totally flaky (memory dump avery time it booted) to mysterious hangs every now and then. The RAM I removed worked fine for 98 and NT but 2000 hated it. You also have to be very careful about mixing single sided and double sided sticks and may have to use alternate slots (1,3 not 1,2). Beats me why. (Running systems slower than spec also worked so timing has something to do with it.)
The reason this may be your problem is the fact that you had to reboot the system. I have found that even when an application crashed and burned I have never had to reboot NT or 2000 (so far) unless the hardware went boinnng. Since upgrading the RAM I have had no problems whatsoever and I have been debugging my totally flaky beginners style multithreaded code quite happily with VS.
|
|
|
|
|
I have a problem in my project, and it make me don't know where to start!
I create a LAN, but One machine runs MS Windows, and the others runs MSDOS. Each of them have a NIC, and link by BNC connectors.
I want to write two programs.
One run in Windows, and one run in DOS. But what protocol should I use for the communication.
if anyone know about it, please send it to me! (documents or programs)
thank for your support!
|
|
|
|