Mail Archives: djgpp/1997/03/21/05:54:52
A. Sinan Unur wrote:
> i don't know what you mean "memory is used differently". however, when
> you are dealing with 16-bit interfaces that expect certain data at
> certain offsets (into the struct), you need to pack your structs to
> override the default 32 bit alignment of struct members.
> here is how i did it:
<snipped>
> basically, the sizeof your ncb struct has to be 64. check yours. BTW, why
> is there a #define in the midle of the struct?
> further, you cannot pass djgpp pointers (32-bit protected mode) to 16 bit
> interfaces, you need to allocate dos memory (or use the transfer buffer;
> see the FAQ) and communicate with netbios via that memory block.
>...
> -- sinan.
1) The packed attribute is not of any help, since the items of ncb are
already correctly aligned.
2) Looking into the code shows that I did use dos allocated memory via
the transfer buffer.
3) I can put the define for NCBASTAT anywhere before it's actually used.
I just put it near where it is used in the structure.
As the code works fine when run as is, I think it's a sufficient proof.
My doubts were about the debugger itself. Anyway, thanks for your
suggestion and your time.
/Régis
- Raw text -