NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

The #using Directive

Imports metadata into a program that will use the Managed Extensions for C++.

#using file

where:

file
A .dll or .exe that was built as a managed program.

Remarks

file can be an MSIL file that you import for its managed data and managed constructs. If a .dll contains an assembly manifest, then all the .dlls referenced in the manifest are imported and the assembly you are building will list file in the metadata as an assembly reference.

If file does not contain an assembly, then you will also need to pass the file name to the /ASSEMBLYMODULE linker option.

Note that when importing metadata built from source that used __declspec(thread), that the thread semantics are not persisted in metadata. For example, a variable declared with __declspec(thread), compiled in a program that is build for the NGWS runtime, and then imported via #using, will no longer have __declspec(thread) semantics on the variable.

If file has metadata only and not an assembly manifest, the following guidelines discuss how to access the metadata:

Example

#using <mscorlib.dll>

See Also

Preprocessor Directives