Click here to Skip to main content
15,922,894 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: migrating to .NET 2003 from visual studio 6.0 problem Pin
Hamid_RT6-Oct-06 19:36
Hamid_RT6-Oct-06 19:36 
AnswerRe: migrating to .NET 2003 from visual studio 6.0 problem Pin
prasad_som6-Oct-06 0:42
prasad_som6-Oct-06 0:42 
AnswerRe: migrating to .NET 2003 from visual studio 6.0 problem Pin
bmzhao6-Oct-06 2:50
bmzhao6-Oct-06 2:50 
QuestionHow to get copy message? Pin
<color>Aljechin 6-Oct-06 0:00
<color>Aljechin 6-Oct-06 0:00 
AnswerRe: How to get copy message? Pin
Michael Dunn6-Oct-06 4:32
sitebuilderMichael Dunn6-Oct-06 4:32 
GeneralRe: How to get copy message? Pin
<color>Aljechin 6-Oct-06 20:06
<color>Aljechin 6-Oct-06 20:06 
GeneralRe: How to get copy message? Pin
Michael Dunn6-Oct-06 20:18
sitebuilderMichael Dunn6-Oct-06 20:18 
GeneralRe: How to get copy message? Pin
<color>Aljechin 6-Oct-06 20:40
<color>Aljechin 6-Oct-06 20:40 
GeneralRe: How to get copy message? Pin
Michael Dunn7-Oct-06 7:01
sitebuilderMichael Dunn7-Oct-06 7:01 
Questionruning a console app from a batch file with indefinite params Pin
9ine5-Oct-06 23:27
9ine5-Oct-06 23:27 
AnswerRe: runing a console app from a batch file with indefinite params Pin
toxcct5-Oct-06 23:51
toxcct5-Oct-06 23:51 
QuestionQuestion about table Pin
zizzzz5-Oct-06 23:23
zizzzz5-Oct-06 23:23 
QuestionRe: Question about table Pin
prasad_som5-Oct-06 23:38
prasad_som5-Oct-06 23:38 
AnswerRe: Question about table Pin
toxcct5-Oct-06 23:56
toxcct5-Oct-06 23:56 
AnswerRe: Question about table Pin
Hamid_RT6-Oct-06 8:35
Hamid_RT6-Oct-06 8:35 
QuestionDirectShow: Knowing video buffer alignment of output frame inside DMO Pin
Johniteq5-Oct-06 23:01
Johniteq5-Oct-06 23:01 
AnswerRe: DirectShow: Knowing video buffer alignment of output frame inside DMO Pin
Johniteq5-Oct-06 23:33
Johniteq5-Oct-06 23:33 
NewsProblem with Batch Scripts and CreateProcess() Pin
neilsolent5-Oct-06 22:40
neilsolent5-Oct-06 22:40 
GeneralRe: Problem with Batch Scripts and CreateProcess() Pin
S Douglas6-Oct-06 13:46
professionalS Douglas6-Oct-06 13:46 
GeneralRe: Problem with Batch Scripts and CreateProcess() Pin
neilsolent7-Oct-06 8:41
neilsolent7-Oct-06 8:41 
GeneralRe: Problem with Batch Scripts and CreateProcess() Pin
S Douglas7-Oct-06 9:12
professionalS Douglas7-Oct-06 9:12 
GeneralRe: Problem with Batch Scripts and CreateProcess() Pin
neilsolent7-Oct-06 9:32
neilsolent7-Oct-06 9:32 
QuestionData types in Visual C++ Pin
Eikthrynir5-Oct-06 22:33
Eikthrynir5-Oct-06 22:33 
Hi!
I have a question regarding the use of different types of integers in Visual C++ 6.0. For example, I want to use in my application an integer variable named nIntValue.

If I declare it like this:
__int16 nIntValue;
does the system allocate it on only 16 bits or it still uses 32 bits as if I declared it:
__int32 nIntValue;

I have created this small test program:
int main( void )
{
  __int32   n32BitsValue = 0x64;
  __int16   n16BitsValue = 0x64;

  return 0;
}

After that, I disassembled it using dumpbin /disasm test.exe.

Then I realized that it allocates 32 bits on the system stack for each variable. So it didn't matter for the OS that I wanted n16BitsValue to be 16 bits long. The only difference I noticed was this:

mov dword ptr [ebp - 4], 64h
mov word ptr [ebp - 8], 64h

So it allocated 32 bits on that stack for n16BitsValue, but modified only 16 of them. If this happens, what need is for these different integer types anyway? What can be done to force the operating system to allocate only 16 bits for an __int16 variable?

Any help would be greatly appreciated.
Thanks in advance!
AnswerRe: Data types in Visual C++ Pin
Link20065-Oct-06 23:24
Link20065-Oct-06 23:24 
AnswerRe: Data types in Visual C++ Pin
toxcct6-Oct-06 0:00
toxcct6-Oct-06 0:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.