Re: WinCE Struct Help

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Steve Maillet \(eMVP\) (nospam1_at_EntelechyConsulting.com)
Date: 03/23/05


Date: Wed, 23 Mar 2005 12:17:37 -0500

The point they are trying to make is that this is a group focused on Windows
CE application development. Your questions are about basic programming in C
and really not related to Windows CE, thus you would be better served asking
such questions in a group more focused to answering the kind of question you
are asking.

To answering the question:

struct foo {
int x;
int y;
unsinged z[10];
//....
};

struct foo* pFoo;

//..

pFoo = malloc(sizeof(*pFoo)*20); // allocate space for 20 foo structures
If(NULL == pFoo)
 //... handle error

...
// reallocate space for 40 items this original 20 are in the same location
in the new larger array and the old one is destroyed.
pFoo = realloc(pFoo, sizeof(*pFoo)*40);

-- 
Steve Maillet
EmbeddedFusion
www.EmbeddedFusion.com
smaillet at EmbeddedFusion dot com


Relevant Pages

  • Re: pointer addition and structs
    ... > int i; ... unsigned char *p = pfoo + offsetof ... to char or unsigned char. ...
    (microsoft.public.vc.language)
  • Re: LogonUser()
    ... // This sample can be run only on Windows XP. ... String lpszPassword, ... int dwLogonType, int dwLogonProvider, ref IntPtr phToken); ... private unsafe static extern int FormatMessage(int dwFlags, ref IntPtr ...
    (microsoft.public.dotnet.security)
  • Re: bringing Pocket Internet Explorer (PIE) to foreground
    ... Peter Foot ... the PIE window did not come to the foreground on the ASUS ... >> Windows Embedded MVP ... >>> public static extern int FindWindow (string lpClassName, ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: W2k/XP hangs with "TAB BS BS" on console
    ... >> console compiler) was executed: ... Now in this function we can see if we disassemble that 'int 2Eh' is called, ... _KiSystemService copies the parameters from the Ring 3 stack which EDX ... NT has this problem in all service packs, Windows 2000 has it and XP seems ...
    (NT-Bugtraq)
  • Re: input/output sound level calibration
    ... Inialisation et configuration mixer de la carte son ... sound_mix_apparatus (void) ... unsigned int nver; ... standard Windows pop-up mixer since it doesn't show the ...
    (comp.sys.ibm.pc.soundcard.tech)