|
ok, then, how to send the authentication to the server
I cannot find such a command in the SMTP command set.
SMTP Commands:
HELO (Hello) <br />
MAIL (Mail) <br />
RCPT (Recipient) <br />
DATA (Data) <br />
SEND (Send) <br />
SOML (Send or mail) <br />
SAML (Send and mail) <br />
RSET (Reset) <br />
VRFY (Verify) <br />
EXPN (Expand) <br />
<br />
HELP (Help) <br />
NOOP (Noop) <br />
QUIT (Quit) <br />
TURN (Turn)
I know there must be a way there, but I can't find it
|
|
|
|
|
|
Unless the client is able to successfully send e-mail, there's no way for you to do it programmatically. Something has to be in place that works.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I want my Program to take SnapShots while it's running without Pressing any Keys on the Keyboard. What Methods/Functions will I use?! please provide sample codes... thanks!!!
|
|
|
|
|
Use DirectDraw, SnapShot PrimarySurface.
|
|
|
|
|
Will it be able to Capture the Contents of my Screen?! pls, Help... I badly need this Information... Thanks!!!
|
|
|
|
|
Of course you can capture full contents of your screen, or a rectangle on the screen. This is the best solution for your purpose. There is lots of samples on the internet about this matter.
Create DirectDraw Primary Surface
Lock The surface and get the surface pointer
Create a bitmap file
Copy memory from surface pointer to file.
(You have to take into account screen pixel depth (16,24,32 bit) for bitmap, these should be same bit depth)
|
|
|
|
|
I think, this Info is for AVI or Video purpose... Am I right?! I only want to Get a SnapShot of the Whole Screen(like Pressing "PrtScr" Key)... Anyway, Thanks for the Info...
|
|
|
|
|
hain bussy i told you last day whole procedure ,u ra enot pressing the key on keyborad for taking snapdhot,this work will done by api for you
pls do take note for this
-----------------------------
"I Think It will Work"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
please tell me the whole procedure... i wasn't able to view the Thread that I made 2 days ago...
|
|
|
|
|
ok, i already got it!!! thanks alot!!!
|
|
|
|
|
How will I be able to Save it on a Bitmap/JPEG File?! thanks alot!!! AWESOME!!!
|
|
|
|
|
Okay, first of all, please look at the following codes. The first block of code was written in C whereas the second
block of code was written in C++.
Both of the codes have the same purpose:
declare an integer variable using register keyword, then print its memoryaddress using & operator. Since the register in CPU does not have a memory address, so if the integer is really put in the CPU's register, it won't print its address, because there is no address.
Note: Both versions were built in VS.Net 03.
--------------------------------------------------
// main.c
<br />
#include <stdio.h><br />
<br />
int main(void)<br />
{<br />
int register a = 10;<br />
printf("%d\n", &a);<br />
<br />
return 0;<br />
}<br />
result: error C2103: '&' on register variable
--------------------------------------------------
// main.cpp
<br />
#include <iostream><br />
<br />
int main()<br />
{ <br />
int register a = 10; <br />
std::cout << &a << std::endl;<br />
<br />
return 0;<br />
}<br />
result : 0012FED4 (successfully built & run)
--------------------------------------------------
Questions:
1.)
The first block of code seemed worked, because it stays an error. However, as I tried to do the same thing in C++, it runs and printed a memory address!!
So, the integer is not actually put in the CPU's register even I declare it with register keyword. And the error I code in the first block of code was just because of the C compiler's ability to flag it as error. (C compiler sees it as syntax error)
So how do I know if it will be put in CPU's register? What is the purpose of the keyword register if it won't do what it is supposed to do?
2.)
I remember during a programming class, I was taught that X86 architecture has 8 registers. Since most CPU are using X86 architecture including intel P4, I wonder if P4 also only has 8 registers?
3.)
I have heard that VS.Net 03 has a way to optimize for the P4, so how do I do that?
Thanks.
|
|
|
|
|
Alex Ngai wrote:
However, as I tried to do the same thing in C++, it runs and printed a memory address!!
In C++, if you take the address of a register variable, then the compiler will automatically make the variable a non-register variable, assuming it was ever going to be one in the first place...
Alex Ngai wrote:
So how do I know if it will be put in CPU's register?
It won't. The MS VC++ compiler does not take any notice of the register keyword.
Alex Ngai wrote:
What is the purpose of the keyword register if it won't do what it is supposed to do?
There is none. These days the compilers optimise well enough that if they honoured your request for a register variable, the program may actually run slower.
Alex Ngai wrote:
I remember during a programming class, I was taught that X86 architecture has 8 registers. Since most CPU are using X86 architecture including intel P4, I wonder if P4 also only has 8 registers?
The x86 architecture has more than 8 registers. Starting with the 80286 there are AH & AL (AX), BH & BL (BX), CH & CL (CX), DH & DL (DX), CS, DS, ES, SS, SP, BP, IP (not directly addressable), SI, DI, FLAGS and MSW. The 80386 and later extend the registers to 32-bits (other than CS, DS, ES and SS) and also add FS, GS, DR0, DR1, DR2, DR3, TR, GDTR and LDTR. The 80486 and later add the FPU registers ST(0) through ST(7). Not much changes then until MMX, which added MM0 through MM7 (shared with the FPU registers). Here is where my knowledge dries up but I know that SSE and SSEII add more registers as well. Later processors may add other registers, but I'm not certain. So the P4 has lots of registers, some used for special purposes, but about half of them can be used as general purpose registers.
Alex Ngai wrote:
I have heard that VS.Net 03 has a way to optimize for the P4, so how do I do that?
Not sure, never used it. Sorry...
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
register is a hint to the optimiser that has no relevance to modern compilers. Don't worry about it. Write your code and generate an assembly listing. Examine that to look at the optimisers register allocation strategy.
You can look at "project properties-C/C++-Optimization/Optimize for processor" in VS.Net and choose P4. Or /G7 on a command line.
Paul
|
|
|
|
|
Okay, the default is "blended". If I choose "Pentium 4" will the program runs faster on P4, but runs slower on P3 or other processors?
What does it optimize? Does it optimize my compiling time? or does it optimize the product (the excutable)?
Thanks
|
|
|
|
|
You will have to try various optimisations and measure the effect.
In general optimisation is to be left well alone until you have a problem, it's good advice to optimise for space rather than speed because that helps to keep your code in the cache, and code in the cache always runs faster than code that has to be fetched from main memory.
Paul
|
|
|
|
|
Hi
I have two questions on C++:
1. If my application continuously allocate and relase memory (each allocation is around 40Kb, and there may be around 40 allocations and deallocations on each iteration), will the application run faster if I were to write a memory manager class that, instead of freeing the allocated memory, it stores it in e.g. a linked list and reuse it when the app requests for memory?
2. If using a memory manager class will be faster, how can I share an instance of this class among all the classes that needs it? I think it will be more efficient to just create one memory manager instance and share it among all the classes, instead of creating one instance of the memory manager for each class that needs it.
Thanks!
|
|
|
|
|
Indrawati wrote:
will the application run faster if I were to write a memory manager class
This is a great post!
In Win32 this would only be true if you think you can improve upon the systems memory manager.
By default, the Process heap performs coalescing operations. (Coalescing is the act of combining adjacent free blocks to build a larger block.) Coalescing costs additional cycles but reduces internal fragmentation of heap blocks.
From: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dngenlib/html/heap3.asp[^]
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
In my current project we have a "large" code base of about 100K SLOC and a set of unit test code of about 50K SLOC. Our challenge now is to maintain the correlation between the test code and the project code. Most of the test code specifically tests a single class/method.
I'm looking for a way to:
1) Quickly determine for a project class/method which test code covers it and vice-versa.
2) Using the above detect where there are "holes" in our testing.
Several options we have considered are:
A) Maintaining an external to the source code reference (spreadsheet, etc.) - This is difficult since it is a separate cross reference to maintain.
B) Documenting directly in our comments using DOxygen's \test tag the relation from project to test code - here, if we document in the project code, a change to the test code would make us change the comments in the project code.
C) Continue attempting to use a code coverage tool like DevPartner Studio's TrueCoverage to generate this data. Unfortunately TrueCoverage's output format doesn't seem conducive to this type of reporting. For example, it doesn't distinguish overloaded methods.
Any tools, procedures, and options are appreciated.
|
|
|
|
|
I need to stay focus on a dialog I dont want to leave focus from the dialog how do I do that?
|
|
|
|
|
Is a modal dialog out of the question?
KMaz?
|
|
|
|
|
ok, But how can I make so you cant press "ESC" or anything to exit the dialog?.
I Want to use a button to exit the dialog not press ESC or anything else how do I do This?
|
|
|
|
|
Override the OnOK and OnCancel functions to do nothing
KMaz
|
|
|
|
|
Ok but you can still press the ESC button to exit the app.
|
|
|
|