Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows::Win32::System::Rpc::NdrClientCall2 #1543

Closed
byehack opened this issue Apr 17, 2023 · 5 comments · Fixed by #1544
Closed

windows::Win32::System::Rpc::NdrClientCall2 #1543

byehack opened this issue Apr 17, 2023 · 5 comments · Fixed by #1544

Comments

@byehack
Copy link
Contributor

byehack commented Apr 17, 2023

Ref: https://learn.microsoft.com/en-us/windows/win32/api/rpcndr/nf-rpcndr-ndrclientcall2

  1. PFORMAT_STRING not defined.
  2. cannot set ... parameter for client side call stack.
@mikebattista
Copy link
Collaborator

I don't know what to do with 2. @kennykerr?

Header

CLIENT_CALL_RETURN RPC_VAR_ENTRY
NdrClientCall2(
    PMIDL_STUB_DESC         pStubDescriptor,
    PFORMAT_STRING          pFormat,
    ...
    );

Winmd

[DllImport("RPCRT4.dll", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, PreserveSig = false)]
[SupportedOSPlatform("windows5.0")]
public unsafe static extern CLIENT_CALL_RETURN NdrClientCall2([In][Out] MIDL_STUB_DESC* pStubDescriptor, [In][Out] byte* pFormat, __arglist);

@kennykerr
Copy link
Contributor

This is probably a windows-rs issue as I don't currently detect vararg functions.

@byehack
Copy link
Contributor Author

byehack commented Apr 18, 2023

This is probably a windows-rs issue as I don't currently detect vararg functions.

True. __arglist parameter in winmd even isn't in method definition in rust crate.

@kennykerr
Copy link
Contributor

I started working on this (microsoft/windows-rs#2457) but ran into a Rust compiler bug that's blocking this from actually rolling out (rust-lang/rust#110505).

@kennykerr
Copy link
Contributor

And I found a workaround that you can try here: microsoft/windows-rs#2458

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants