Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
p6runtimeapi.h
Go to the documentation of this file.
1 
12 #ifndef P6RUNTIMEAPI_H__
13 #define P6RUNTIMEAPI_H__ 1
14 
15 #include "p6errorinfo.h"
16 #include "p6dllapi.h"
17 #include "p6thread.h"
18 
19 
20 #ifdef __cplusplus
21 namespace P6R {
22 extern "C" {
23 #endif
24 
26 
31 typedef P6UINT32 P6COMFLAGS;
32 
41 static const P6COMFLAGS P6CF_NOFLAGS = 0x00000000;
42 
49 static const P6COMFLAGS P6CF_RESERVED1 = 0x00000001;
50 
58 static const P6COMFLAGS P6CF_DISABLELOGS = 0x00000002;
59 
65 static const P6COMFLAGS P6CF_VERBOSELOGS = 0x00000004;
66 
72 static const P6COMFLAGS P6CF_UNUSED2 = 0x00000008;
73 
79 static const P6COMFLAGS P6CF_UNUSED1 = 0x00000010;
80 
86 static const P6COMFLAGS P6CF_NOSERVICES = 0x00000020;
87 
96 static const P6COMFLAGS P6CF_UPDATEAPPCONF = 0x00000080;
97 
105 static const P6COMFLAGS P6CF_CONTINUEEXCEPTIONS = 0x00000100;
106 
116 static const P6COMFLAGS P6CF_DONTFILTERCMDLINE = 0x00000200;
117 
124 static const P6COMFLAGS P6CF_DISABLESERVICE = 0x00000400;
126 
128 
131 
134 
137 
140 
144 typedef P6ERR (P6CCALL *P6SUBMAIN)(P6INT32 argc,P6CHAR *argv[],p6ICurThread *pCurThread,p6ILogProducer *pThreadLogger);
145 
169 P6API P6ERR P6CCALL p6Initialize(P6SUBMAIN pfnSubMain,P6INT32 argc,P6CHAR *argv[],P6COMFLAGS fFlags);
170 typedef P6ERR (P6CCALL *P6INITIALIZE)(P6SUBMAIN pfnSubMain,P6INT32 argc,P6CHAR *argv[],P6COMFLAGS fFlags);
171 
172 
199 
202 
223 P6API P6ERR P6CCALL p6GetRuntimeIface(const P6REFIID iid,P6VOID **ppIface);
225 
254 P6API P6ERR P6CCALL p6CreateInstance(p6ICom *pOuter,const P6REFCID cid,const P6REFIID iid,P6VOID **ppIface);
255 
273 P6API P6ERR P6CCALL p6UUIDToString(const P6REFUUID uuid,P6CHAR *pBuffer,P6SIZE cBuffer);
274 
292 P6API P6ERR P6CCALL p6UUIDToWString(const P6REFUUID uuid,P6WCHAR *pBuffer,P6SIZE cBuffer);
293 
311 P6API P6ERR P6CCALL p6StringToUUID(const P6CHAR *pszUUID,P6REFUUID uuid);
312 
330 P6API P6ERR P6CCALL p6WStringToUUID(const P6WCHAR *pszUUID,P6REFUUID uuid);
331 
346 P6API P6CHAR * P6CCALL p6ErrToStr(P6ERR err,P6CHAR *pszBuffer,P6SIZE cBuffer);
347 
362 P6API P6WCHAR * P6CCALL p6ErrToWStr(P6ERR err,P6WCHAR *pszBuffer,P6SIZE cBuffer);
363 
365 
386 P6API P6ERR P6CCALL p6GetModuleFilename(P6WCHAR *pszBuffer,P6SIZE *pcBuffer);
388 
408 P6API P6ERR P6CCALL p6GetDirectory(P6DIRS nDir,P6WCHAR *pBuffer,P6SIZE cBuffer,P6SIZE *pcWritten);
409 
421 P6API P6INT32 P6CCALL p6AtomicInc32(P6INT32 volatile *pVar);
422 
434 P6API P6INT32 P6CCALL p6AtomicDec32(P6INT32 volatile *pVar);
435 
449 
464 
479 
493 P6API P6VOID* P6CCALL p6AtomicSetPtr(P6VOID volatile **pVar,P6VOID *pValue);
494 
508 P6API P6UINT32 P6CCALL p6HashData(const P6UINT8 *pData,P6SIZE cData,P6UINT32 hash);
509 
517 P6API P6UINT32 P6CCALL p6HashString(const P6CHAR *pszData);
518 
526 P6API P6UINT32 P6CCALL p6HashStringW(const P6WCHAR *pszData);
527 
528 P6API P6UINT32 P6CCALL p6HashBCSTR(P6BCSTR *pbcsString);
529 
530 P6API P6UINT32 P6CCALL p6HashBWCSTR(P6BWCSTR *pbwcsString);
531 
540 
549 
561 
563 
593 P6API P6ERR P6CCALL p6SetError(const P6IID *piid,const P6CHAR *pszFile,P6UINT32 cLine,P6ERR error,const P6WCHAR *pwszContext,const P6WCHAR *pwszDescription);
594 
626 P6API P6ERR P6CCALL p6SetErrorA(const P6IID *piid,const P6CHAR *pszFile,P6UINT32 cLine,P6ERR error,const P6CHAR *pszContext,const P6CHAR *pszDescription);
627 
636 P6API P6ERR P6CCALL p6GetErrorInfo(p6IErrorInfo **ppInfo);
638 
651 P6API P6ERR P6CCALL p6AllocMemory(P6SIZE cSize,P6VOID **ppMemory);
652 
663 
678 P6API P6ERR P6CCALL p6AllocComString(const P6WCHAR *pszSource,P6COMSTR *ppNewString);
679 
689 
707 P6API P6ERR P6CCALL p6ComStringLen(const P6COMSTR pString,P6SIZE *pLength);
708 
726 P6API P6ERR P6CCALL p6ComStringByteLen(const P6COMSTR pString,P6SIZE *pLength);
727 
741 P6API P6ERR P6CCALL p6AllocComStringLen(P6WCHAR *pszSource,P6SIZE nSize,P6COMSTR *ppNewString);
742 
754 P6API P6ERR P6CCALL p6GetRuntimeVersion(P6VERINFO *pVerInfo);
755 
765 P6API P6ERR P6CCALL p6GetThreadLogger(p6ILogProducer **ppLogger);
766 
779 
781 P6API P6ERR P6CCALL p6Backtrace(P6CHAR *pBuffer,P6SIZE cBuffer,P6UINT32 cFramesToSkip,P6BTFLAGS fFlags);
782 
783 P6API P6ERR P6CCALL p6Assert(const P6WCHAR *pszExpr,const P6CHAR *pszFile,P6UINT32 nLine);
785 
797 
798 
827 P6API P6ERR P6CCALL p6CreateCryptoInstance(const P6REFCID cid,const P6REFIID iid,P6VOID **ppIface);
828 
850 P6API P6ERR P6CCALL p6GetCryptoProviderVersion(P6CHAR *pBuffer,P6SIZE cBuffer,P6SIZE *pcWritten,P6BOOL bVerbose);
851 
853 
874 P6API P6ERR P6CCALL p6TraceAddref(const P6CHAR *pszClassname,P6UINT32 cClassSize,P6VOID *classAddr,P6INT32 refCount,P6UINT32 *pSerialNumber);
875 
876 P6API P6ERR P6CCALL p6TraceRelease(const P6CHAR *pszClassname,P6VOID *classAddr,P6INT32 refCount,P6UINT32 *pSerialNumber);
877 
878 P6API P6ERR P6CCALL p6TraceCTOR(const P6CHAR *pszClassname,P6UINT32 cClassSize,P6VOID *classAddr,P6UINT32 *pSerialNumber);
879 
880 P6API P6ERR P6CCALL p6TraceDTOR(const P6CHAR *pszClassname,P6VOID *classAddr,P6UINT32 *pSerialNumber);
881 
882 P6API P6VOID P6CCALL p6ComponentCTOR();
883 
884 P6API P6VOID P6CCALL p6ComponentDTOR();
886 
889 #ifdef __cplusplus
890 } // extern "C"
891 } // namespace
892 #endif
893 
894 #endif
size_t P6SIZE
Definition: p6types.h:90
#define P6REFUUID
Definition: p6defs.h:195
uint64_t P6UINT64
Definition: p6types.h:79
P6API P6VOID *P6CCALL p6AtomicSetPtr(P6VOID volatile **pVar, P6VOID *pValue)
Atomically sets the value in the variable pointed to by pVar with the specified value.
P6API P6ERR P6CCALL p6GetRuntimeVersion(P6VERINFO *pVerInfo)
Return version informaton for runtime.
#define P6CCALL
Definition: p6defs.h:124
P6API P6ERR P6CCALL p6GetDirectory(P6DIRS nDir, P6WCHAR *pBuffer, P6SIZE cBuffer, P6SIZE *pcWritten)
This method can be used to retrieve the location of the specified directory.
P6API P6ERR P6CCALL p6GetRuntimeIface(const P6R::P6IID &iid, P6VOID **ppIface)
This method is used to retreive any of the loader runtime interfaces.
P6API P6WCHAR *P6CCALL p6ErrToWStr(P6ERR err, P6WCHAR *pszBuffer, P6SIZE cBuffer)
Convert a standard P6R::P6ERR into it's P6WCHAR* string representation.
P6API P6ERR P6CCALL p6ComStringLen(const P6COMSTR pString, P6SIZE *pLength)
Returns the length in characters of a P6COMSTR not including the terminating NULL character...
P6API P6UINT32 P6CCALL p6HashBCSTR(P6BCSTR *pbcsString)
#define P6REFIID
Definition: p6defs.h:197
uint32_t P6UINT32
Definition: p6types.h:77
Threading interfaces and definitions.
P6API P6UINT64 P6CCALL p6HashUINT64(P6UINT64 nInteger)
A 64 bit integer hash.
P6API P6INT32 P6CCALL p6AtomicAdd32(P6INT32 volatile *pVar, P6INT32 value)
Atomically adds the specified value to the variable pointed to by pVar.
unsigned char P6BOOL
Boolean type.
Definition: p6types.h:133
P6UUID P6IID
An interface ID.
Definition: p6types.h:172
P6WCHAR * P6COMSTR
Standard COM length encoded string.
Definition: p6types.h:117
P6API P6ERR P6CCALL p6CreateCryptoInstance(const P6R::P6CID &cid, const P6R::P6IID &iid, P6VOID **ppIface)
Creates a single uninitialized instance of the cryptographic interface associated with the specified ...
P6API P6ERR P6CCALL p6WStringToUUID(const P6WCHAR *pszUUID, P6R::P6UUID &uuid)
Used to convert the wide character string representation of a P6UUID in the form "{00000000-0000-0000...
#define P6API
[p6]COM runtime glue
Definition: p6defs.h:147
P6API P6ERR P6CCALL p6GetCryptoProviderVersion(P6CHAR *pBuffer, P6SIZE cBuffer, P6SIZE *pcWritten, P6BOOL bVerbose)
This function retrieves a string that describes the underlying crypto provider's name and version...
P6API P6INT32 P6CCALL p6AtomicDec32(P6INT32 volatile *pVar)
Atomically decrements the variable pointed to by pVar by one.
P6API P6UINT32 P6CCALL p6HashString(const P6CHAR *pszData)
An implementation of Paul Hsieh's super fast hash for narrow strings.
unsigned char P6UINT8
Definition: p6types.h:71
P6API P6INT32 P6CCALL p6AtomicInc32(P6INT32 volatile *pVar)
Atomically increments the variable pointed to by pVar by one.
P6API P6ERR P6CCALL p6ComStringByteLen(const P6COMSTR pString, P6SIZE *pLength)
Returns the length in bytes of a P6COMSTR not including the terminating NULL character.
P6API P6ERR P6CCALL p6FreeMemory(P6VOID *pMemory)
Frees memory allocated with p6AllocMemory().
P6API P6ERR P6CCALL p6AllocComStringLen(P6WCHAR *pszSource, P6SIZE nSize, P6COMSTR *ppNewString)
Allocates a new COM String of the sepcified size and optionally containing a copy of pszSource...
P6API P6ERR P6CCALL p6MapOSError(P6UINT32 oserr)
Used by porting layers to map OS error values to P6ERR values.
P6API P6INT64 P6CCALL p6AtomicSet64(P6INT64 volatile *pVar, P6INT64 value)
Atomically sets the value in the variable pointed to by pVar with the specified value.
wchar_t P6WCHAR
Wide character type see p6i18n.h.
Definition: p6types.h:111
P6UINT32 P6BTFLAGS
Runtime API Types.
Definition: p6types.h:872
P6API P6INT32 P6CCALL p6AtomicSet32(P6INT32 volatile *pVar, P6INT32 value)
Atomically sets the value in the variable pointed to by pVar with the specified value.
P6API P6UINT32 P6CCALL p6HashStringW(const P6WCHAR *pszData)
An implementation of Paul Hsieh's super fast hash for wide strings.
P6API P6ERR P6CCALL p6FreeComString(P6COMSTR pString)
Frees a COM string previously allocated with p6AllocComString(), p6AllocComStringLen(), p6AllocComStringByteLen()
P6API P6ERR P6CCALL p6CreateInstance(p6ICom *pOuter, const P6R::P6CID &cid, const P6R::P6IID &iid, P6VOID **ppIface)
Creates a single uninitialized instance of the class/interface associated with the specified componen...
int64_t P6INT64
Definition: p6types.h:78
P6DIRS
This enumeration defines the directories which can be retrieved using the p6GetDirectory() API...
Definition: p6types.h:897
P6COM DLL runtime api definitions.
p6IErrorInfo interface definition
P6API P6ERR P6CCALL p6UUIDToString(const P6R::P6UUID &uuid, P6CHAR *pBuffer, P6SIZE cBuffer)
This function is used to convert a P6UUID into a string in the form "{00000000-0000-0000-0000-0000000...
P6API P6UINT32 P6CCALL p6HashData(const P6UINT8 *pData, P6SIZE cData, P6UINT32 hash)
An implementation of Paul Hsieh's super fast hash for arbitrary non-NULL terminated data...
it may not contain all the symbols used by this software If you run into undefined symbol please let us know and we can provide you a build that will be compatible with your specific value
Definition: readme.txt:85
P6API P6ERR P6CCALL p6StringToUUID(const P6CHAR *pszUUID, P6R::P6UUID &uuid)
Used to convert a string representing a P6UUID in the form "{00000000-0000-0000-0000-000000000000}" i...
P6API P6ERR P6CCALL p6AllocMemory(P6SIZE cSize, P6VOID **ppMemory)
Allocated a block of memory.
P6UINT32 P6ERR
COM err return type see P6ERR.h.
Definition: p6types.h:141
P6API P6ERR P6CCALL p6UUIDToWString(const P6R::P6UUID &uuid, P6WCHAR *pBuffer, P6SIZE cBuffer)
This function is used to convert a P6UUID into a wide string in the form "{00000000-0000-0000-0000-00...
P6API P6ERR P6CCALL p6AllocComString(const P6WCHAR *pszSource, P6COMSTR *ppNewString)
Allocates a new COM string the same length as pSource and copies the characters in pSource into the n...
P6API P6VOID P6CCALL p6DbgBreak()
A platform independent embeddable breakpoint.
P6API P6UINT32 P6CCALL p6HashBWCSTR(P6BWCSTR *pbwcsString)
P6API P6ERR P6CCALL p6GetThreadLogger(p6ILogProducer **ppLogger)
Used to retrieve the p6ILogProducer interface for the current thread.
P6API P6UINT32 P6CCALL p6HashUINT64to32(P6UINT64 nInteger)
A 64 bit integer to 32 bit hash.
#define P6REFCID
Definition: p6defs.h:196
void P6VOID
Definition: p6types.h:109
int32_t P6INT32
Definition: p6types.h:76
P6API P6UINT32 P6CCALL p6HashUINT32(P6UINT32 nInteger)
A 32 bit integer hash.
P6API P6CHAR *P6CCALL p6ErrToStr(P6ERR err, P6CHAR *pszBuffer, P6SIZE cBuffer)
Convert a standard P6R::P6ERR into it's ASCII string representation.
char P6CHAR
Narrow character type.
Definition: p6types.h:105