46 #ifndef QT_NO_WIN_ACTIVEQT 148 hRes = CoRegisterClassObject(clsid, p, CLSCTX_LOCAL_SERVER,
182 #if defined(Q_OS_WINCE) 190 #if defined(QT_NEEDS_QMAIN) 191 int qMain(
int,
char **);
194 #if defined(Q_OS_WINCE) 195 extern "C" int __cdecl
main(
int,
char **);
197 extern "C" int main(
int,
char **);
202 EXTERN_C
int WINAPI
WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR,
int nShowCmd)
216 bool runServer =
false;
217 for (
int i = 0; i < cmds.
count(); ++i) {
219 if (cmd ==
"-activex" || cmd ==
"/activex" || cmd ==
"-embedding" || cmd ==
"/embedding") {
221 }
else if (cmd ==
"-unregserver" || cmd ==
"/unregserver") {
225 }
else if (cmd ==
"-regserver" || cmd ==
"/regserver") {
229 }
else if (cmd ==
"-dumpidl" || cmd ==
"/dumpidl") {
231 if (i < cmds.
count()) {
235 if (i < cmds.
count() && (cmds.
at(i) ==
"-version" || cmds.
at(i) ==
"/version")) {
237 if (i < cmds.
count())
238 version = cmds.
at(i);
245 qWarning(
"Wrong commandline syntax: <app> -dumpidl <idl file> [-version <x.y.z>]");
250 unprocessed += cmds.
at(i) +
' ';
259 qWinMain(hInstance, hPrevInstance, unprocessed.
data(), nShowCmd, argc, argv);
273 #endif // QT_NO_WIN_ACTIVEQT static QString fromWCharArray(const wchar_t *, int size=-1)
Returns a copy of the string, where the encoding of string depends on the size of wchar...
STDAPI DumpIDL(const QString &outfile, const QString &ver)
#define QT_END_NAMESPACE
This macro expands to.
char * data()
Returns a pointer to the data stored in the byte array.
QAxFactory * qAxFactory()
static bool stopServer()
Stops the COM server and returns true if successful, otherwise returns false.
The QByteArray class provides an array of bytes.
bool qax_startServer(QAxFactory::ServerType type)
iterator begin()
Returns an STL-style iterator pointing to the first item in the list.
QByteArray toLower() const
Returns a lowercase copy of the byte array.
int count(const T &t) const
Returns the number of occurrences of value in the list.
The QString class provides a Unicode character string.
The QVector class is a template class that provides a dynamic array.
virtual QStringList featureList() const =0
Reimplement this function to return a list of the widgets (class names) supported by this factory...
void __cdecl qWinMain(HINSTANCE, HINSTANCE, LPSTR, int, int &, QVector< char *> &)
#define QT_BEGIN_NAMESPACE
This macro expands to.
HRESULT GetClassObject(const GUID &clsid, const GUID &iid, void **ppUnk)
iterator end()
Returns an STL-style iterator pointing to the imaginary item after the last item in the list...
const T & at(int i) const
Returns the item at index position i in the list.
The QStringList class provides a list of strings.
Q_CORE_EXPORT void qWarning(const char *,...)
wchar_t qAxModuleFilename[MAX_PATH]
QByteArray toLocal8Bit() const Q_REQUIRED_RESULT
Returns the local 8-bit representation of the string as a QByteArray.
virtual bool isService() const
Reimplement this function to return true if the server is running as a persistent service (e...
QT_STATIC_CONST DWORD dwTimeOut
const char * constData() const
Returns a pointer to the data stored in the byte array.
QList< QByteArray > split(char sep) const
Splits the byte array into subarrays wherever sep occurs, and returns the list of those arrays...
static bool startServer(ServerType type=MultipleInstances)
Starts the COM server with type and returns true if successful, otherwise returns false...
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
ServerType
This enum specifies the different types of servers that can be started with startServer.
const_iterator ConstIterator
Qt-style synonym for QList::const_iterator.
#define QT_USE_NAMESPACE
This macro expands to using QT_NAMESPACE if QT_NAMESPACE is defined and nothing otherwise.
QFuture< T > run(Function function,...)
static HANDLE hEventShutdown
EXTERN_C int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR, int nShowCmd)
T * data()
Returns a pointer to the data stored in the vector.
int __cdecl main(int, char **)
static DWORD WINAPI MonitorProc(void *pv)
HRESULT UpdateRegistry(BOOL bRegister)
QT_STATIC_CONST DWORD dwPause
static bool StartMonitor()
virtual QUuid classID(const QString &key) const
Reimplement this function to return the class identifier for each key returned by the featureList() i...
static DWORD * classRegistration
bool qax_winEventFilter(void *message)