IMofCompiler::CompileFile method (wbemcli.h)
HRESULT CompileFile( [in] LPWSTR FileName, [in] LPWSTR ServerAndNamespace, [in] LPWSTR User, [in] LPWSTR Authority, [in] LPWSTR Password, [in] LONG lOptionFlags, [in] LONG lClassFlags, [in] LONG lInstanceFlags, [in, out] WBEM_COMPILE_STATUS_INFO *pInfo );
The name of the file to be compiled.
The path to the default namespace where any classes or instance are written.
You can specify a namespace on a remote computer ("\computer\root", for example). This value can be overridden by the #pragma command and should not be used if auto recovery is desired. If NULL, then the root\default namespace on the local computer is the default.
A value that specifies the credentials used to compile on remote computers. If the value is NULL, the user context is whatever the calling process is using. This is always ignored when connecting to the local computer. For more information, see the Remarks section.
A value that specifies the credentials for compiling on remote computers. If the value is NULL, the authority context is whatever the calling process is using. This is always ignored when connecting to the local computer. For more information, see the Remarks section.
A value that specifies the credentials for compiling on remote computers. If the value is NULL, the password of the current context is used. This is always ignored when connecting to the local computer.
A parameter that, when the CompileFile method is used, enables the combination of one or more of the following flags.
Performs only a syntax check.
If the method is successful, adds the name of the file to the list of files to be compiled during automatic database recovery.
Be aware that this flag cannot be combined with either the namespace, class, or instance flags.
Sends various useful messages to the console.
Prevents the file from being added to the list of files compiled during automatic database recovery.
This flag is not compatible with WBEM_FLAG_AUTORECOVER.
The flags that control the creation of classes.
Parameters may be 0 or a combination of the following values.
Prevents creation of a class.
You can combine this flag with either WBEM_FLAG_UPDATE_SAFE_MODE or WBEM_FLAG_UPDATE_FORCE_MODE.
Allows only class creation.
You may not combine this flag with the other flags.
Updates the class unless conflicts exist.
You may combine this flag with WBEM_FLAG_UPDATE_ONLY.
Updates and resolves conflicts wherever possible. Using force mode to update a static class results in the deletion of all instances of that class. Force update on a provider class does not delete instances of the class.
You may combine this flag with llnstanceFlags.
The flags that control the creation of instances.
Parameter values can be either 0 or one of the following flags.
Only allow updates.
Allow only new instances.
[in, out] pInfo
Pointer to a WBEM_COMPILE_STATUS_INFO that describes an error.
If the parameter value is not NULL, an error has occurred, and the structure is filled with error information.
This method can return one of these values.
Warning that #pragma autorecover statement is not present. This statement should be one the first line of the MOF file.
If the User parameter is in the form of <domain\user>, the Authority parameter must be NULL.
|Minimum supported client||Windows Vista|
|Minimum supported server||Windows Server 2008|
|Header||wbemcli.h (include Wbemidl.h)|