Re: how to transfer a DWORD from a function?
- From: "Igor Tandetnik" <itandetnik@xxxxxxxx>
- Date: Mon, 12 Dec 2005 22:06:26 -0500
"monkeydragon" <kerby.martino@xxxxxxxxx> wrote in message
news:1134442380.262533.234770@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
> one last thing,
> with this code
> DWORD* ptDW = new DWORD [192];
>
> with that how can I get the size 192
You can't. You have to keep track of the size of the buffer you
allocated.
> sizeof(ptDW) doesn't seem to return 192?
No it doesn't.
> furthermore it rises problems especially when:
> DWORD* ptDW = new DWORD [SIZE_DEPENDS];
DWORD size = SIZE_DEPENDS;
DWORD* ptDW = new DWORD[size];
Now just keep both ptDW and size around.
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
.
- Follow-Ups:
- Re: how to transfer a DWORD from a function?
- From: monkeydragon
- Re: how to transfer a DWORD from a function?
- References:
- how to transfer a DWORD from a function?
- From: monkeydragon
- Re: how to transfer a DWORD from a function?
- From: Igor Tandetnik
- Re: how to transfer a DWORD from a function?
- From: monkeydragon
- Re: how to transfer a DWORD from a function?
- From: Igor Tandetnik
- Re: how to transfer a DWORD from a function?
- From: monkeydragon
- Re: how to transfer a DWORD from a function?
- From: Igor Tandetnik
- Re: how to transfer a DWORD from a function?
- From: monkeydragon
- Re: how to transfer a DWORD from a function?
- From: Igor Tandetnik
- Re: how to transfer a DWORD from a function?
- From: monkeydragon
- how to transfer a DWORD from a function?
- Prev by Date: Re: how to transfer a DWORD from a function?
- Next by Date: Strange error in vc++ 6.0 about errno and sqltypes.h
- Previous by thread: Re: how to transfer a DWORD from a function?
- Next by thread: Re: how to transfer a DWORD from a function?
- Index(es):
Relevant Pages
|
|