[comp.windows.ms] LARGE MODEL PROGRAMS IN MS-WINDOWS

balaji@nsc.nsc.com (Balaji Pitchaikani) (11/06/89)

Hi,
   Is anyone using large model for Windows Programming. Microsoft says it 
doesnot support large model under windows. Does anyone know the reason. 
If large model should not be used then what is the soln. for very large code & 
data programs. Should we not write such programs??.
   I am going ahead with Large model with lots of Crazy problems. One of the
interesting problem is as follows:
   I have a global variable 'tmp' defined in one of the source modules
then I was trying to use this variable as follows:-

   SendMessage(hEditWnd,EM_GETLINE,lnno,(LONG)tmp);

'tmp' didnot contain the value I should have got. But when I use a local 
variable in this function and when I do the same thing. The Value is perfect!!
DATA has been defined as FIXED in defn. file.

  Has anyone else also faced such problems. Is there any explanation for this
behaviour.

Synopsis of Not Working code:-
----------------------------
char tmp[128];
    ...
[may functions]
    ...
EditProc(hWnd,iMessage,wParam,lParam)
  ...
{
     ...
     SendMessage(hEditWnd,EM_GETLINE,lnno,(WORD)tmp);
     ...
}

Synopsis of  Working code:-
-------------------------
    ...
[may functions]
    ...

EditProc(hWnd,iMessage,wParam,lParam)
  ...
{
    char tmp[128];
     ...
     SendMessage(hEditWnd,EM_GETLINE,lnno,(WORD)tmp);
     ...
}
     e-mail to me the replies at balaji@nsc.nsc.com. If there is enough interest
I will post a summary in the net.

---------
Balaji.P   (National SemiConductors Corp. SantaClara, CA.)
email : balaji@nsc.nsc.com
Addr  : 3707, Poinciana Dr, #27             Work : (408) - 721-2782
        SantaClara, CA-95051                Home : (408) - 243-6034
---------