Re: windows 95 RPC
From: Yong Qu[MSFT] (yongqu_at_online.microsoft.com)
Date: 05/28/04
- Next message: Gene: "Two LSPs on 9x"
- Previous message: Gene: "Re: LSP suggestion's needed"
- In reply to: vipin: "Re: windows 95 RPC"
- Next in thread: vipin: "Re: windows 95 RPC"
- Reply: vipin: "Re: windows 95 RPC"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 27 May 2004 17:06:19 -0700
sorry for chime in late.
I don't think /Oicf is supported in original 95, but it's supported in Win98
etc. After the original Windows 95, RPC in following Win9x family is
basically in sync with NT4sp4 and beyond. /Oicf support is added that time.
However, no /robust support is available in Win9x and NT4 family though. can
you give me a pointer to the document where we say /Oicf is not supported in
Win98? We might need to follow up with documentation.
Also, is the following what you really want?
Call([out] long *pSize, [out,size_is(,*pSize)] Test1 **pptr)
Please noticed that I don't have a "1" in front of the comma. In this case,
pptr is not a multi-dimensional array. It is a pointer to a variable
sized-array whose size is *pSize.
In your definition, ptr becomes a multi-dimensional array, whose first
dimension is a fixed size 1 array, and second dimension is variable sized
array.
Please let me know if this clarify things a bit.
thanks,
Yong
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"vipin" <vipin@nospam.com> wrote in message
news:#CJjtsmQEHA.3476@tk2msftngp13.phx.gbl...
> Hello All,
>
> Interface of the following form compiles fine for windows 95 with the
/Oic
> and /Os, Is it that the below is an exception where it is 1*1 sort of
array?
>
> typedef struct {
> int sz;
> } Test1;
> typedef struct {
> int sz;
> [,size_is(sz)] Test1 **ptr1; //but embedded multidimensional
works
> } Test;
> void Call ([out] int *psize , [out] Test **ptr); // This
works
> !!!!!!!!!
> // int Call ([out] int *psize , [out,size_is(1,*psize)] Test1 **ptr);
> This doesn't work
>
>
> What I am noting is that the embedded members can be multidimensional
and
> the toplevel has to be always a 1*1,if required to be multidimensional.
>
> Can some light be thrown on this documentation from /Os documentation:-
>
> "In /Os and /Oi modes, the compiler supports simple cases, such as
> fixed-size arrays. Using multidimensional arrays in /Os or /Oi modes can
> result in parameters that are not marshaled correctly. Microsoft
recommends
> that you use the /Oicf command line switch when your interface defines
> parameters that are multidimensional arrays or multidimensional-sized
> pointers."
>
> Questions:-
> 1) Is 1*1 an exception ?
> 2) Is multidimensional-sized pointers (something like the one in Test
> reliable) because the documentation says only "multidimensional arrays"
may
> not be marshalled reliably?
>
>
> Thanks in advance
> vipin
>
> "Eugene Gershnik" <gershnik@hotmail.com> wrote in message
> news:#$yht8lQEHA.1388@TK2MSFTNGP09.phx.gbl...
> > vipin wrote:
> > >If I use Oicf, I can't support windows 98 clients which I want to.
> >
> > Yup. You have a choice of
> > 1) Change your code so it doesn't use multi-dim pointers and use /Oic or
> /Os
> > 2) Don't support 9x systems
> >
> > > The documentation is written with windows NT system in mind because I
> > > can't even compile with /Os for windows 98/ME a multidimensional
> > > array as the document states.
> >
> > The documentation doesn't say that. In fact it says exactly the
opposite.
> If
> > you want to use multi-dim arrays you cannot use /Os.
> >
> > --
> > Eugene
> >
> >
>
>
- Next message: Gene: "Two LSPs on 9x"
- Previous message: Gene: "Re: LSP suggestion's needed"
- In reply to: vipin: "Re: windows 95 RPC"
- Next in thread: vipin: "Re: windows 95 RPC"
- Reply: vipin: "Re: windows 95 RPC"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|