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

DllImportAttribute dllName not explicitly specified for bthprops.cpl #714

Closed
riverar opened this issue Oct 28, 2021 · 1 comment · Fixed by #777
Closed

DllImportAttribute dllName not explicitly specified for bthprops.cpl #714

riverar opened this issue Oct 28, 2021 · 1 comment · Fixed by #777
Assignees
Labels
bug Something isn't working usability Touch-up to improve the user experience for a language projection

Comments

@riverar
Copy link
Collaborator

riverar commented Oct 28, 2021

Consider the BluetoothAuthenticateDevice API. This function lives in bthprops.cpl. Without an explicit .cpl suffix, callers may fail attempting to append system native .dll, .a, etc. instead.

Propose that all imports that stray from the defaults be generated with explicit dllNames.

// win32metadata 12.0.2.30863

[DllImport("bthprops", ExactSpelling = true)]
[SupportedOSPlatform("windows6.0.6000")]
public unsafe static extern uint BluetoothAuthenticateDevice([Optional][In] HWND hwndParent, [Optional][In] HANDLE hRadio, [In][Out] BLUETOOTH_DEVICE_INFO* pbtbi, [Optional][In][NativeArrayInfo(CountParamIndex = 4)] PWSTR pszPasskey, [In] uint ulPasskeyLength);

Related: microsoft/windows-rs#1255

@riverar riverar changed the title DllImportAttribute dllName not explicitly specified for bthprops.cpl, et al. DllImportAttribute dllName not explicitly specified for bthprops.cpl Oct 29, 2021
@mikebattista mikebattista added bug Something isn't working usability Touch-up to improve the user experience for a language projection labels Nov 1, 2021
@kennykerr
Copy link
Contributor

This also makes the printer APIs impossible to use - we need the file extension.

Here's another customer blocked by this issue:
microsoft/windows-rs#1447

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working usability Touch-up to improve the user experience for a language projection
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants