|
Check resource editor.
Kuphryn
|
|
|
|
|
You have given me a very big Hint but i didnt get sorry...
If you can specify some details then it would be helpful for me to solve the problem..
awating reply
Thanx
TAKE CARE
|
|
|
|
|
Hi!
in my program I often have to allocate and dellocate buffers for strings. For this, I thought I could avoid memory fragmentation by using an own memory allocation routine which will allocate some more bytes than needed, so many as needed to fill a full block.
What is the best size for such a "full" block?
Thanks in advance!
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
If u r using string from STL, it gives facility of reserving memory space.
Read more on Function reserve().
This will suffice the need.
The chosen One
|
|
|
|
|
No, I am not using STL. I allocate the memory using 'new' and pointing with a char* to it.
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
Would it be of any benefit to only allocate the memory once and just reuse it?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
The maximum size of a string is variable (it could just be one character or 2000 for example). Also there isn't any string number limit (only one string or more than 1000).
So I need to allocate them dynamically.
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
That's fine. I was just trying to ascertain whether you could minimize the impact on the memory manager. One idea, which is how MFC's CString class works, is to only reallocate when necessary. Something like:
char *pBuffer;
int amount_currently_allocated = 0;
while (...)
{
amount_needed = ???;
if (amount_needed > amount_currently_allocated)
{
delete [] pBuffer;
pBuffer = new char[amount_needed];
amount_currently_allocated = amount_needed;
}
...
}
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
DavidCrow wrote:
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
2 ???
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
I have a problem with the net use /d cmd in NT, basically we have an application that runs a batch file to map a drive to a unix box on startup -
net use z: \\servername\sharename password username /persistent:no
the on close down it removes the mapping using -
net use z: /d
after this if I try to remap the drive I get the following error -
System error 1312 has occurred.
A specified logon session does not exist. It may already have
been terminated.
This seems to be caused by the fact that the TCP session is not closed by the net use /d, if I close it using a util called tcpview by systems internals I can then reconnect.
Does any one know of a utility that will let me close a TCP port from the cmd prompt, I have been trying to write one myself but although I can create a connection, list the TCP connections etc I can't seem to work out how to connect to and close an existing connection created by another process.
Any Ideas? i'm stuck.
|
|
|
|
|
hmmm, i don't think, that this is a question for the visual c++ forum!
Don't try it, just do it!
|
|
|
|
|
Hi everybody.
My problem.
Catch or retries Processes when execute file .EXE.
I had used functoin WaitForDebugEvent(...) but can't.
Please tell me
Thank you.
|
|
|
|
|
http://www.codeproject.com/threads/processapi.asp[^]
This is a tool for Process enumeration, you can regularly check whether your exe is running or not.
Your program can get called when you modify the default value of this registry key:
HKEY_CLASSES_ROOT\exefile\shell\open\command
Its value should be:
"c:\\pathtoyourexe.exe" %*
Your exe will receive the path to the app which the user double clicked on the command line.
Bunburry
|
|
|
|
|
I want to create my own pattern brush, but I got a little bit confused by the MSDN documentaion.
The documentation of the CBrush::CreatePatternBrush methods says there is a general limitation for the pattern bitmap of 8x8 Pixel. Ok so far, but the documentation of the corresponding API function CreatePatternBrush says that this limitation is only valid for Window 95 and that larger bitmaps will work for Win98, 2000 and XP:
"Windows 95: Creating brushes from bitmaps or DIBs larger than 8 by 8 pixels is not supported. If a larger bitmap is specified, only a portion of the bitmap is used.
Windows 98/Me and Windows NT/2000/XP: Brushes can be created from bitmaps or DIBs larger than 8 by 8 pixels."
So what's true? Does the limitation exists if I use the MFC method, but not if I use the API function???
Thanks in advance for clarifying this confusion.
|
|
|
|
|
It's often educational to read the MFC source code
CBrush::CreatePatternBrush is a simple wrapper around the API function, and hence has the same limitations. The MFC documentation simply doesn't indicate that newer versions of Windows don't have this limitation.
|
|
|
|
|
Thanks for the answer. Fortunately this confirms my knowledge about MFC
I also got this answer using trial-and-error.
|
|
|
|
|
I would like a program I am working on to be abel to accept dropped URL's from f.i. IExplorer. But DragAcceptFiles only seems to enable the dropping of local files. When I try to drag an URL to my app window it I get a 'no drop' mouse pointer.
I know it can be done, VC can do it and several other apps I use as well.
I hope someone can help! Thanks.
|
|
|
|
|
Hi there,
Does anyone know how to add new fonts to the very limited number of fonts in VC++ 6 ? Any add-in or a procedure?
Best Regards, Dushkin.
|
|
|
|
|
Hello,
is there any way to get an email in the mime format by using
outlook automation and C++(wrapper classes ...)?
Thanks for helping !
|
|
|
|
|
hi,
for replaceselectionformula i compare date field. following statement
m_report.ReplaceSelectionFormula("{customer_master.lastrent}>'2003-11-13'")
i got error of incorrect formula. what's the error any one help to me.
Thanks in advance.
Murali.M
|
|
|
|
|
It might not be converting '2003-11-13' correctly into a date by assuming YYYY-MM-DD. I think there's a function in CR you can use to convert from a string to a date, or alternatively, you could use a parameter which has the date type.
Steve S
|
|
|
|
|
how do i stop a time consuming for loop in run time?
(apart from using callbacks/multithreading)
is there a brutal way to stop a loop like:
for (int i=0; i<=10000000000000; i++) {
j += i;
}
ideas ???
|
|
|
|
|
|
make it like this:
for (int i=0; i<=10000000000000; i++) {
j += i;
if( bStop )
break;
}
...
void Stop()
{
bStop = TRUE;
}
AND: i is an integer number, so 10000000000000 IS INVALID for int!!! (too big)
Don't try it, just do it!
|
|
|
|
|
I embeded the matlab program(symbolic equation) into visual studio 6.0
with MATLAB Add-in. Unfortunately, they can't compile the matlab code.
following is the error message
The MATLAB Compiler does not currently support MATLAB object-oriented programming. References to the method "sym" will produce a run-time error.
Please help me.
dong wook lee
|
|
|
|