Skip to content

Commit 2709e4a

Browse files
committed
Add additional src-native guidelines
1 parent c05d144 commit 2709e4a

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ git submodule add https://github.com/thnetii/windows-api.git
6767
In addition to the usual `src`/`test` directories, this repository also
6868
includes some additional directories.
6969

70-
### src
70+
### src-native
7171

72-
The `src` subdirectory contains the thin P/Invoke wrappers around the
72+
The `src-native` subdirectory contains the thin P/Invoke wrappers around the
7373
Windows APIs located in the various headers files of the Windows SDK.
7474

7575
The declarations and definitions in a C Header file are generally mapped using
@@ -105,6 +105,18 @@ the following guidelines:
105105
attribute applied to the declared type. Structures use the sequential layout
106106
kind; unions use the explicit layout kind with all fields using a field offset
107107
of `0` (zero).
108+
* Documentation comments should use usual triple-slash C# comments. Oftentimes
109+
the API documentation from docs.microsoft.com will contain references to other
110+
members across different projects. If these references that are purely for
111+
documentation purposes, consider adding a `PrivateAssets="All"` project
112+
reference. If this would lead to a circular reference, use a fully qualified
113+
type prefix reference.
114+
* Documentation comments for overloads should use ambiguous cref references with
115+
only the method name being specified. For that reason, overload definitions
116+
should place the most common overload first in the source code. Suppress
117+
warning `CS0419` in the project file and GlobalSuppressions.
118+
* Functions taking or returning string-type arguments should order the
119+
string-marshalling variants before the `LPSTR` (and related) variants.
108120

109121
### symbols
110122

0 commit comments

Comments
 (0)