Re: windows 95 RPC

From: Yong Qu[MSFT] (yongqu_at_online.microsoft.com)
Date: 05/28/04


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
> >
> >
>
>


Relevant Pages

  • Re: Problem with StgOpenStorage in single-writer, multireader, direct mode
    ... Unlike what the documentation suggests, STGM_DIRECT_SWMR is a flag supported ... This mode is not supported on Windows NT 4.0 ... > To support the single-writer, multireader, direct mode, I open the root ...
    (microsoft.public.win32.programmer.ole)
  • Re: windows 95 RPC
    ... Use /no_robust if you need to support platform earlier than Windows ... This is not a multidimensional array. ... this is pointer to pointer to a simple structure. ...
    (microsoft.public.win32.programmer.networks)
  • Re: Running processes
    ... MSDN says that EnumProcesses() is only supported under NT. ... The Process Status API is available in Windows NT 3.1, 4.0, Windows 2000, ... It's been so long since I did anything in support of Win98 I can't recall ... Part of the problem of MSDN documentation is they have been removing ...
    (microsoft.public.vc.mfc)
  • Re: Running processes
    ... MSDN says that EnumProcessesis only supported under NT. ... The Process Status API is available in Windows NT 3.1, 4.0, Windows 2000, ... It's been so long since I did anything in support of Win98 I can't recall ... Part of the problem of MSDN documentation is they have been removing ...
    (microsoft.public.vc.mfc)
  • Re: Cheap, Good Lisps For Novices
    ... GCL is supported on Windows, and carries maxima, acl2, and ... Documentation could use some improvement. ... >> reasonably complete, good diagnostics, support for Window programming ... "The earth is but one country, ...
    (comp.lang.lisp)

Quantcast