Click here to Skip to main content
15,905,967 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
AnswerRe: Data types in Visual C++ Pin
Gary R. Wheeler6-Oct-06 3:04
Gary R. Wheeler6-Oct-06 3:04 
GeneralRe: Data types in Visual C++ Pin
Eikthrynir6-Oct-06 6:42
Eikthrynir6-Oct-06 6:42 
AnswerRe: Data types in Visual C++ Pin
Hamid_RT6-Oct-06 19:31
Hamid_RT6-Oct-06 19:31 
QuestionToo many WM_MOUSEWHEEL events issue Pin
Tnarol5-Oct-06 22:02
Tnarol5-Oct-06 22:02 
QuestionFtpCommand not defined in Visual Studio Pin
codepanter5-Oct-06 21:51
codepanter5-Oct-06 21:51 
AnswerRe: FtpCommand not defined in Visual Studio Pin
benjymous5-Oct-06 21:59
benjymous5-Oct-06 21:59 
GeneralRe: FtpCommand not defined in Visual Studio Pin
codepanter6-Oct-06 0:51
codepanter6-Oct-06 0:51 
GeneralRe: FtpCommand not defined in Visual Studio Pin
David Crow6-Oct-06 2:43
David Crow6-Oct-06 2:43 
AnswerRe: FtpCommand not defined in Visual Studio Pin
Hamid_RT5-Oct-06 22:04
Hamid_RT5-Oct-06 22:04 
QuestionTo compare two Images to find out the mismatch between them Pin
Dinu_IP5-Oct-06 21:33
Dinu_IP5-Oct-06 21:33 
AnswerRe: To compare two Images to find out the mismatch between them Pin
Sarath C5-Oct-06 22:02
Sarath C5-Oct-06 22:02 
AnswerRe: To compare two Images to find out the mismatch between them Pin
Hamid_RT6-Oct-06 8:30
Hamid_RT6-Oct-06 8:30 
Questioncolor the text of radio button Pin
vasmvr5-Oct-06 21:06
vasmvr5-Oct-06 21:06 
AnswerRe: color the text of radio button Pin
prasad_som5-Oct-06 21:18
prasad_som5-Oct-06 21:18 
AnswerRe: color the text of radio button Pin
Hamid_RT5-Oct-06 21:26
Hamid_RT5-Oct-06 21:26 

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.