|
Whmm... Is there a way around this?
http://support.microsoft.com/default.aspx?scid=kb;en-us;135787
|
|
|
|
|
Does the location of a function in my source code (the file I keep it in) effect the speed of execution in the release build?
Kevin
|
|
|
|
|
No.
Christian
NO MATTER HOW MUCH BIG IS THE WORD SIZE ,THE DATA MUCT BE TRANSPORTED INTO THE CPU. - Vinod Sharma
|
|
|
|
|
Maybe.
If a function is in the same file, the compiler may be able to inline it.
If the code is small enough and close enough, you might get lucky and both the caller and callee will be in the same cache line.
|
|
|
|
|
Hello there,
In Windows Sockets, is it possible to do have a server socket listen on, say port 2000, and then when a remote machine connects to it, have the resulting connection be established on another port? ...and then have that server socket continue listening on port 2000 for any other connections (they may be from the same remote machine) ?
Thanks!
swine
Check out Aephid Photokeeper, the powerful digital
photo album solution at www.aephid.com.
|
|
|
|
|
|
You don't change the port, in the article, as he asks about
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Swinefeaster wrote:
have the resulting connection be established on another port?
AFAIK, no, then it's not possible.
Why do you wanna do this anyway, you can have thousands connections to the same port on a server...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Yes, but what if you needed more than one socket connection from the same machine with that same server? You would need another socket on the server to listen on a different port so that you could connect the second socket?
Thanks,
swine
Check out Aephid Photokeeper, the powerful digital
photo album solution at www.aephid.com.
|
|
|
|
|
It already works that way. You create a socket that "listens" on port 2000 and when somebody "connects" to that port, you "accept" the connection (creating another socket) and the "listen" socket continues "listening" for more "connects". There are several socket interfaces, but they all basically work this way.
|
|
|
|
|
is it possible to add characters to the beggining or end of a string, ir so where can i learn, thanks a lot
|
|
|
|
|
|
I suspect by string you mean a char *, in which case the answer is strcat. Better to use std::string like this
string s = "fish";
s = "eat more " + s;
s = s + " to be more fit";
s now equals "eat more fisn to be more fit'.
Christian
NO MATTER HOW MUCH BIG IS THE WORD SIZE ,THE DATA MUCT BE TRANSPORTED INTO THE CPU. - Vinod Sharma
|
|
|
|
|
Christian Graus wrote:
s now equals "eat more fisn to be more fit'.
What's a fisn? Do they taste good?
And they still ran faster and faster and faster, till they all just melted away, and there was nothing left but a great big pool of melted butter
|
|
|
|
|
Peter Hancock wrote:
What's a fisn? Do they taste good?
Sure do, especially if you have them with chipn.
Christian
NO MATTER HOW MUCH BIG IS THE WORD SIZE ,THE DATA MUCT BE TRANSPORTED INTO THE CPU. - Vinod Sharma
|
|
|
|
|
hiya how do i get a handle to a dialog, as i want to set the title of the dialog dynamically using SetWindowText().
Also, is there really no way of deleting functions and variables in .NET?? can't believe that u can't delete them out of the project without going right to the .cpp and .h files and deleting them there...
thanks,
grahamoj..
|
|
|
|
|
|
Another solution is GetDlgItem().
Kuphryn
|
|
|
|
|
Actually, I´ve always programmed xla add-ins for Excel and have just started to be interested in c++. Most of the codes I program are finantial functions to be used in Excel and I wish to build a dll file with all of them, but Visualc++ IDE is still too complex for me. I wonder if someone could help me with a code sample. For instance, let´s suppose I define the simple following function:
double sums (double a, double b)
{
return a+b;
}
What steps should I follow to build the dll file?
How can I call the function from the VBA editor?
Can the spreadsheet user call it as Excel worksheet functions?
God bless you if you can help me. Thanks.
|
|
|
|
|
I'm looking for ideas on how to make a CWnd-derived window behave like a CDialog , especially in what concerns the DoModal behaviour. By this I mean encapsulating the whole window life cycle inside a function call. By calling the function or class method, the window would be created and destroyed at the user command. Only then the function / method would return.
Any ideas?
|
|
|
|
|
|
|
Hello,
I've designed my report by Crystal Report 8.5
And right now i'm using Crystal Report ActiveX in my project.
I'm looking for a way to show the report of a special record number, directly.
For example, i wanna show the report of Record number 4.
NEED FOR SPEED
Is there any way ?
Regards,
|
|
|
|
|
I have created a dll with a function that creates an array of structures. The calling application supplies a pointer that gets filled in by the dll call. The application then loops through the number of structures created by the dll call, and makes use of the info.
My plan was to have the application do the clean up as it looped through the returned data. When I call delete within the loop, I get a crash/assertion that I think is telling me that the objects were created on a different heap.
Is there a better way to do this? I don't want to have the applications call a enumerateXXX() type call where they have to identify a callback. I thought it would be best to just have them call something like this:
<br />
applications code:<br />
<br />
int nNum = 0;<br />
DSTRUCT *pds = NULL;<br />
mydllGetData(&nNum,&pData);<br />
for (int x = 0;x < nNum;x++){<br />
delete pds;
pds++;<br />
}<br />
<br />
dll code:<br />
mydllGetData(int *pNum,DSTRUCT &pds)<br />
{<br />
DSTRUCT *pNewDS = new DSTRUCT[15];<br />
*pds = pNewDS;<br />
*pNum = 15;<br />
<br />
}<br />
Thanks for any ideas you may have.
|
|
|
|
|
you can override new and delete for those objects and have them allocate from the global heap (via GlobalAlloc). that lets you keep your code looking like it does above. otherwise, as you've discovered, you can't share pointers allocated inside a DLL with the client application.
-c
When history comes, it always takes you by surprise.
|
|
|
|