875{
876#ifndef __REACTOS__
887
890
892
893 for (;;) {
895 if (ch == '"') quoted = !quoted;
896 if (!quoted && (ch == ' ' || ch == ',' || ch == '\0')) {
898 if (beg) {
899 if (*beg == '@') {
901 } else if (*beg == '\0') {
903 } else {
904 extraPmtsBuf = beg;
905 }
906 }
907 if (ch == '\0') break;
909 if (ch ==
' ')
while (
end[1] ==
' ')
end++;
910 }
912 }
915
916
917 if (extraPmtsBuf !=
NULL)
918 {
919 beg =
end = extraPmtsBuf;
921
922 for (;;) {
924 if (ch == '"') quoted = !quoted;
925 if (!quoted && (ch == ' ' || ch == ',' || ch == '\0')) {
927 if (beg) {
928 if (*beg != '\0') {
929 extraPmts = beg;
930 }
931 }
932 if (ch == '\0') break;
934 if (ch ==
' ')
while (
end[1] ==
' ')
end++;
935 }
937 }
938
941
942 if (extraPmts ==
NULL)
943 extraPmts = extraPmtsBuf;
944 }
945
946
947 if ((extraPmts) && (*extraPmts ==
'@') && (
sp == -1)) {
949 }
950
952
954 if (applet)
955 {
956
958 while ((++
sp) != applet->
count) {
960
962 break;
963 }
964 }
965
967 WARN(
"Out of bounds (%u >= %u), setting to 0\n",
sp, applet->
count);
969 }
970
973
975 }
976
978#else
990
994 {
997 if (wszDialogBoxName !=
NULL)
999 return;
1000 }
1001
1002
1003 for (
i = 0;
i < nLen;
i++)
1004 {
1005 if (quoted && wszCmd[
i] !=
L'"')
1006 continue;
1008 {
1010 quoted = !quoted;
1011 break;
1013 if (!pchFirstComma)
1014 pchFirstComma = &wszCmd[
i];
1015 else if (!pchSecondComma)
1016 pchSecondComma = &wszCmd[
i];
1017 break;
1019 pchLastUnquotedSpace = &wszCmd[
i];
1020 break;
1021 }
1022 }
1023
1024
1025
1026 if (!pchFirstComma)
1027 {
1028
1029
1030 if (pchLastUnquotedSpace)
1031 {
1032 int nSpaces = 0;
1033
1034 while (pchLastUnquotedSpace[nSpaces] ==
L' ')
1035 nSpaces++;
1036
1038 StringCchCopyW(wszDialogBoxName, nLen + 1, pchLastUnquotedSpace + nSpaces);
1039 }
1040
1041 else
1042 {
1044 }
1045 }
1046
1047
1048
1049
1050
1051 else
1052 {
1053
1054
1055 if (!pchSecondComma)
1056 pchSecondComma = wszCmd + nLen;
1057
1060 nLen + 1,
1061 pchFirstComma + 1,
1062 pchSecondComma - pchFirstComma - 1);
1063
1064 if (pchSecondComma != wszCmd + nLen)
1065 {
1066 extraPmts = pchSecondComma + 1;
1067 }
1068 }
1069
1070
1073
1074 while ((
ptr =
StrChrW(wszDialogBoxName,
'"')))
1076
1077 if (wszDialogBoxName[0] ==
L'@')
1078 {
1079 sp =
_wtoi(wszDialogBoxName + 1);
1080 }
1081
1083
1085 if (applet)
1086 {
1092 AppDlgFindData findData;
1093
1094
1096 {
1097 while ((++
sp) != applet->
count)
1098 {
1100
1102 break;
1103 }
1104 }
1105
1106 if (
sp >= applet->
count && wszDialogBoxName[0] ==
L'\0')
1107 {
1109 }
1110
1112
1113 if (sp < applet->
count)
1114 {
1116 if (!aCPLPath)
1118
1120 if (!aCPLName)
1122
1124 if (!aCPLFlags)
1126
1127 findData.szAppFile = applet->
cmd;
1129 findData.aCPLName = aCPLName;
1130 findData.aCPLFlags = aCPLFlags;
1131 findData.hRunDLL = applet->
hWnd;
1132 findData.hDlgResult =
NULL;
1133
1134
1136 if (findData.hDlgResult)
1137 {
1139 }
1140 else
1141 {
1144 Control_ShowAppletInTaskbar(applet,
sp);
1145
1146 if (extraPmts[0] ==
L'\0' ||
1148 {
1150 }
1151
1154 }
1155 }
1156
1158
1159 if (bActivated)
1161 }
1162
1165#endif
1166}
#define UlongToHandle(ul)
LPWSTR WINAPI StrChrW(LPCWSTR lpszStr, WCHAR ch)
#define INVALID_HANDLE_VALUE
#define HeapFree(x, y, z)
BOOL WINAPI DeactivateActCtx(IN DWORD dwFlags, IN ULONG_PTR ulCookie)
BOOL WINAPI ActivateActCtx(IN HANDLE hActCtx, OUT PULONG_PTR ulCookie)
ATOM WINAPI GlobalFindAtomW(LPCWSTR lpString)
ATOM WINAPI GlobalDeleteAtom(ATOM nAtom)
ATOM WINAPI GlobalAddAtomW(LPCWSTR lpString)
CPlApplet * Control_LoadApplet(HWND hWnd, LPCWSTR cmd, CPanel *panel)
void Control_UnloadApplet(CPlApplet *applet)
int WINAPI StrCmpIW(LPCWSTR lpszStr, LPCWSTR lpszComp)
GLuint GLuint GLsizei count
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_Check_return_ _CRTIMP int __cdecl _wtoi(_In_z_ const wchar_t *_Str)
#define memmove(s1, s2, n)
unsigned __int3264 UINT_PTR
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
STRSAFEAPI StringCchCopyNW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc, size_t cchToCopy)
struct applet_info info[1]
HANDLE WINAPI RemovePropW(_In_ HWND, _In_ LPCWSTR)
BOOL WINAPI EnumWindows(_In_ WNDENUMPROC lpEnumFunc, _In_ LPARAM lParam)
BOOL WINAPI SetPropW(_In_ HWND, _In_ LPCWSTR, _In_opt_ HANDLE)
BOOL WINAPI BringWindowToTop(_In_ HWND)