April 26, 2024, 02:45:36 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


wbemtran.inc error

Started by Andy, October 14, 2017, 01:47:52 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Andy

Was just trying to compile a bit of Sapero's code but I get a compile error with one of the include files

wbemtran.inc - it's missing a $ENDIF statement

$ifndef __wbemtran_inc__
$define __wbemtran_inc__

$ifndef __rpc_inc__
$include "rpc.inc"
$endif
$ifndef __rpcndr_inc__
$include "rpcndr.inc"
$endif


$ifndef COM_NO_WINDOWS
$ifndef __windowssdk_inc__
$include "windowssdk.inc"
$endif
$ifndef __ole2_inc__
$include "ole2.inc"
$endif
$endif


$ifndef __objidl_inc__
$include "objidl.inc"
$endif
$ifndef __oleidl_inc__
$include "oleidl.inc"
$endif
$ifndef __oaidl_inc__
$include "oaidl.inc"
$endif
$ifndef __wbemcli_inc__
$include "wbemcli.inc"
$endif

/*******************************************************************************/
/* */
/* Copyright © Microsoft Corporation. All rights reserved. */
/* */
/* This IDL file contains interfaces needed only by implementors of custom */
/* transports and custom security systems. These interfaces are not needed */
/* for either client or provider access to CIMOM. */
/* */
/* See WBEMCLI.IDL for client interfaces, and WBEMPROV.IDL for provider */
/* extensions */
/* */
/*******************************************************************************/

$ifndef __WbemTransports_v1_LIBRARY_DEFINED__
$define __WbemTransports_v1_LIBRARY_DEFINED__

typedef WBEM_LOGIN_TYPE int
$define WBEM_FLAG_INPROC_LOGIN 0
$define WBEM_FLAG_LOCAL_LOGIN 1
$define WBEM_FLAG_REMOTE_LOGIN 2
$define WBEM_AUTHENTICATION_METHOD_MASK 0xf
$define WBEM_FLAG_USE_MULTIPLE_CHALLENGES 0x10

typedef WBEM_128BITS pointer

EXTERN _LIBID_WbemTransports_v1 as GUID

EXTERN _IID_IWbemTransport as GUID
'MIDL_INTERFACE("553fe584-2156-11d0-b6ae-00aa003240c7")
interface IWbemTransport ' IUnknown
stdmethod QueryInterface(pointer riid,pointer ppvObject),HRESULT
stdmethod AddRef(),ULONG
stdmethod Release(),ULONG
'IWbemTransport
stdmethod Initialize(),HRESULT
endinterface

EXTERN _IID_IWbemLevel1Login as GUID
'MIDL_INTERFACE("F309AD18-D86A-11d0-A075-00C04FB68820")
interface IWbemLevel1Login ' IUnknown
stdmethod QueryInterface(pointer riid,pointer ppvObject),HRESULT
stdmethod AddRef(),ULONG
stdmethod Release(),ULONG
stdmethod EstablishPosition(/* pointerpointer[in] */ LPWSTR wszClientMachineName,DWORD dwProcessId,pointer phAuthEventHandle),HRESULT
stdmethod RequestChallenge(/* pointerpointer[in] */ LPWSTR wszNetworkResource,/* pointerpointer[in] */ LPWSTR wszUser,WBEM_128BITS Nonce),HRESULT
stdmethod WBEMLogin(/* pointerpointer[in] */ LPWSTR wszPreferredLocale,WBEM_128BITS AccessToken,long lFlags,pointer pCtx,pointer ppNamespace),HRESULT
stdmethod NTLMLogin(/* pointerpointer[in] */ LPWSTR wszNetworkResource,/* pointerpointer[in] */ LPWSTR wszPreferredLocale,long lFlags,pointer pCtx,pointer ppNamespace),HRESULT
endinterface

EXTERN _IID_IWbemConnectorLogin as GUID
'MIDL_INTERFACE("d8ec9cb1-b135-4f10-8b1b-c7188bb0d186")
interface IWbemConnectorLogin ' IUnknown
stdmethod QueryInterface(pointer riid,pointer ppvObject),HRESULT
stdmethod AddRef(),ULONG
stdmethod Release(),ULONG
stdmethod ConnectorLogin(/* pointerpointer[in] */ LPWSTR wszNetworkResource,/* pointerpointer[in] */ LPWSTR wszPreferredLocale,long lFlags,pointer pCtx,pointer riid,pointer pInterface),HRESULT
endinterface

EXTERN _IID_IWbemAddressResolution as GUID
'MIDL_INTERFACE("F7CE2E12-8C90-11d1-9E7B-00C04FC324A8")
interface IWbemAddressResolution ' IUnknown
stdmethod QueryInterface(pointer riid,pointer ppvObject),HRESULT
stdmethod AddRef(),ULONG
stdmethod Release(),ULONG
stdmethod Resolve(LPWSTR wszNamespacePath,LPWSTR wszAddressType,pointer pdwAddressLength,pointer pabBinaryAddress),HRESULT
endinterface

EXTERN _CLSID_WbemLevel1Login as GUID
EXTERN _CLSID_WbemLocalAddrRes as GUID
EXTERN _CLSID_WbemUninitializedClassObject as GUID

EXTERN _IID_IWbemClientTransport as GUID
'MIDL_INTERFACE("F7CE2E11-8C90-11d1-9E7B-00C04FC324A8")
interface IWbemClientTransport ' IUnknown
stdmethod QueryInterface(pointer riid,pointer ppvObject),HRESULT
stdmethod AddRef(),ULONG
stdmethod Release(),ULONG
stdmethod ConnectServer(pointer strAddressType,DWORD dwBinaryAddressLength,pointer abBinaryAddress,pointer strNetworkResource,pointer strUser,pointer strPassword,pointer strLocale,long lSecurityFlags,pointer strAuthority,pointer pCtx,pointer ppNamespace),HRESULT
endinterface

EXTERN _IID_IWbemClientConnectionTransport as GUID
'MIDL_INTERFACE("a889c72a-fcc1-4a9e-af61-ed071333fb5b")
interface IWbemClientConnectionTransport ' IUnknown
stdmethod QueryInterface(pointer riid,pointer ppvObject),HRESULT
stdmethod AddRef(),ULONG
stdmethod Release(),ULONG
stdmethod Open(pointer strAddressType,DWORD dwBinaryAddressLength,pointer abBinaryAddress,pointer strObject,pointer strUser,pointer strPassword,pointer strLocale,long lFlags,pointer pCtx,pointer riid,pointer pInterface,pointer pCallRes),HRESULT
stdmethod OpenAsync(pointer strAddressType,DWORD dwBinaryAddressLength,pointer abBinaryAddress,pointer strObject,pointer strUser,pointer strPassword,pointer strLocale,long lFlags,pointer pCtx,pointer riid,pointer pResponseHandler),HRESULT
stdmethod Cancel(long lFlags,pointer pHandler),HRESULT
endinterface

EXTERN _CLSID_WbemDCOMTransport as GUID

EXTERN _IID_IWbemConstructClassObject as GUID
'MIDL_INTERFACE("9ef76194-70d5-11d1-ad90-00c04fd8fdff")
interface IWbemConstructClassObject ' IUnknown
stdmethod QueryInterface(pointer riid,pointer ppvObject),HRESULT
stdmethod AddRef(),ULONG
stdmethod Release(),ULONG
stdmethod SetInheritanceChain(long lNumAntecedents,/* pointer[in] */ LPWSTR awszAntecedents),HRESULT
stdmethod SetPropertyOrigin(/* [in] */ LPCWSTR wszPropertyName,long lOriginIndex),HRESULT
stdmethod SetMethodOrigin(/* [in] */ LPCWSTR wszMethodName,long lOriginIndex),HRESULT
stdmethod SetServerNamespace(/* [in] */ LPCWSTR wszServer,/* [in] */ LPCWSTR wszNamespace),HRESULT
endinterface

$endif



Can anyone see where it goes?
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Andy

Both wbemtran.inc AND wbemdisp.inc are missing a $ENDIF each.

wbemtran.inc I believe should be :

$ifndef __wbemtran_inc__
  $define __wbemtran_inc__
$endif


and wbemdisp.inc should be:

$ifndef __wbemdisp_inc__
$define __wbemdisp_inc__
$endif


As this will effect all of us, think this should be a bug report?

Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

LarryMc

Quote from: Andy on October 14, 2017, 03:53:33 AM
Both wbemtran.inc AND wbemdisp.inc are missing a $ENDIF each.

wbemtran.inc I believe should be :

$ifndef __wbemtran_inc__
  $define __wbemtran_inc__
$endif


and wbemdisp.inc should be:

$ifndef __wbemdisp_inc__
$define __wbemdisp_inc__
$endif


As this will effect all of us, think this should be a bug report?
Andy
Putting the missing $endif where you put it is counter to the format followed by Sapero
After careful examination, here's what happen
He started in inc with his normal
$ifndef __wbemtran_inc__
  $define __wbemtran_inc__

then he entered a bunch of of blocks of code that all matched up fine
then, in both inc files can the same mess up
he copy and pasted code( with the MS copyright header) into the file
The copied code included its own $ifndef/$endif entry
so when he looked at the end of his file there was the last line with the $endif like all his files are suppose to have if they start with with the $ifndef (like these did) so everything looked good.
He just didn't realize he had pasted in that extra $ifndef in there.

So, the proper place for the missing $endif is on the tail end of both files.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library