|
|
Up |
|
|
  |
Author:
Date: Jan 22, 2008 13:53
I have a program which has been having a number of problems with heap
memory ... this is built in MSVC++ 6.0, recently I added support for
unicode, and switched from static link libraries to DLLs for LGPL
reasons.
The current problem, I have class StringHandler, which has a public
member
wchar_t * wc;
In my application class, I call a method of StringHandler which
assigns a string to this pointer,
wc = (wchar_t *)malloc(requiredBytes);
int error = MultiByteToWideChar(CP_UTF8, 0, kpcIn, -1, wc,
requiredBytes);
Then in the destructor for StringHandler, I try to free this memory
free(wc);
And I get an ASSERT on this function
CrtIsValidHeapPointer()
Just for the heck of it I tried this in the destructor
void * test = malloc(1000);
free(test);
|
| Show full article (2.60Kb) |
|
| |
6 Comments |
|
  |
Author: FangQFangQ
Date: Jan 22, 2008 13:05
hi
I want to automatically run a program whenever a new USB drive is
attached to my system, is there a file or registry key to specify this
behavior? (note: this is like an autorun from the windows side, not on
the USB drive side)
if there is no such mechanism on windows, and I have to write my own
program to monitor this event, what message should my program listen
to?
thanks
Qianqian
|
| |
|
| |
3 Comments |
|
  |
Author: Owen RansenOwen Ransen
Date: Jan 22, 2008 08:11
The return value of _beginthreadex has changed from
HANDLE to uintptr_t, (from VC6 to VC2005 I tink)
which is not compatible with CloseHandle, which wants
a HANDLE (naturally)
Can I assume that HANDLE and uintptr_t are compatible in
this case?
I have read and re-read when to use CloseHandle, but I'm
still not sure if I should use it:
>You can call _endthread or _endthreadex explicitly to terminate a
>thread; however, _endthread or _endthreadex is called automatically
>when the thread returns from the routine passed as a parameter.
Ok, I am using _beginthreadex so _endthreadex is called automatically
right?
>Terminating a thread with a call to endthread or _endthreadex
>helps to ensure proper recovery of resources allocated for the
>thread.
Does this mean that in the case of the function hanging I should
call _endthreadex explicitly?
|
| Show full article (1.35Kb) |
|
2 Comments |
|
  |
Author: elquedroselquedros
Date: Jan 22, 2008 04:26
On Jan 16, 10:08Â pm, G. Morgan wrote:
> Birdbrain wrote:
> Ummmm... no. Â It has no virus or rootkits. Â And that article really
> had nothing to do with this download.
|
| |
|
no comments
|
|
  |
Author: elquedroselquedros
Date: Jan 22, 2008 04:14
On Jan 17, 1:41Â pm, spamtr...@mail.ru wrote:
>> G. Morgan wrote:
>>> Ummmm... no. Â It has no virus or rootkits.
>
>> We can take your word for that, can we?
>
> You don't have to. Anything that is available on Sorceforge
> can not have viruses. The'd pull that account in a minute.
> Secondly, the source code is available to see every single thing
> it does.
>
> And finally, run your virus scanner, if you do not quite trust
> what you see or hear.
>
> To distribute the programs with viruses, you have to be senile.
> You won't last long nowadays. It is a matter of couple of days,
> and your whole years worth of effort are gone to waste.
|
| Show full article (0.74Kb) |
|
no comments
|
|
  |
|
|
  |
Author: Ulrich EckhardtUlrich Eckhardt
Date: Jan 22, 2008 01:34
Aman JIANG wrote:
You can move the location of MS Windows' start button and the associated
bar. You can also define whole new toolbars and their locations.
> (sorry for my english)
Feel free to use your native language (preferably in addition to English) if
you think you can't express yourself. Even if I can't read it, someone else
might.
cheers
Uli
--
Sator Laser GmbH
Geschäftsführer: Michael Wöhrmann, Amtsgericht Hamburg HR B62 932
|
| |
|
1 Comment |
|
|
|
|