876{
877#ifndef __REACTOS__
888
891
893
894 for (;;) {
896 if (ch == '"') quoted = !quoted;
897 if (!quoted && (ch == ' ' || ch == ',' || ch == '\0')) {
899 if (beg) {
900 if (*beg == '@') {
902 } else if (*beg == '\0') {
904 } else {
905 extraPmtsBuf = beg;
906 }
907 }
908 if (ch == '\0') break;
910 if (ch ==
' ')
while (
end[1] ==
' ')
end++;
911 }
913 }
916
917
918 if (extraPmtsBuf !=
NULL)
919 {
920 beg =
end = extraPmtsBuf;
922
923 for (;;) {
925 if (ch == '"') quoted = !quoted;
926 if (!quoted && (ch == ' ' || ch == ',' || ch == '\0')) {
928 if (beg) {
929 if (*beg != '\0') {
930 extraPmts = beg;
931 }
932 }
933 if (ch == '\0') break;
935 if (ch ==
' ')
while (
end[1] ==
' ')
end++;
936 }
938 }
939
942
943 if (extraPmts ==
NULL)
944 extraPmts = extraPmtsBuf;
945 }
946
947
948 if ((extraPmts) && (*extraPmts ==
'@') && (
sp == -1)) {
950 }
951
953
955 if (applet)
956 {
957
959 while ((++
sp) != applet->
count) {
961
963 break;
964 }
965 }
966
968 WARN(
"Out of bounds (%u >= %u), setting to 0\n",
sp, applet->
count);
970 }
971
974
976 }
977
979#else
991
995 {
998 if (wszDialogBoxName !=
NULL)
1000 return;
1001 }
1002
1003
1004 for (
i = 0;
i < nLen;
i++)
1005 {
1006 if (quoted && wszCmd[
i] !=
L'"')
1007 continue;
1009 {
1011 quoted = !quoted;
1012 break;
1014 if (!pchFirstComma)
1015 pchFirstComma = &wszCmd[
i];
1016 else if (!pchSecondComma)
1017 pchSecondComma = &wszCmd[
i];
1018 break;
1020 if (!pchFirstComma)
1021 pchFirstComma = &wszCmd[
i];
1022 else
1023 pchLastUnquotedSpace = &wszCmd[
i];
1024 break;
1025 }
1026 }
1027
1028
1029
1030 if (!pchFirstComma)
1031 {
1032
1033
1034 if (pchLastUnquotedSpace)
1035 {
1036 int nSpaces = 0;
1037
1038 while (pchLastUnquotedSpace[nSpaces] ==
L' ')
1039 nSpaces++;
1040
1042 StringCchCopyW(wszDialogBoxName, nLen + 1, pchLastUnquotedSpace + nSpaces);
1043 }
1044
1045 else
1046 {
1048 }
1049 }
1050
1051
1052
1053
1054
1055 else
1056 {
1057
1058
1059 if (!pchSecondComma)
1060 pchSecondComma = wszCmd + nLen;
1061
1064 nLen + 1,
1065 pchFirstComma + 1,
1066 pchSecondComma - pchFirstComma - 1);
1067
1068 if (pchSecondComma != wszCmd + nLen)
1069 {
1070 extraPmts = pchSecondComma + 1;
1071 }
1072 }
1073
1074
1077
1078 while ((
ptr =
StrChrW(wszDialogBoxName,
'"')))
1080
1081 if (wszDialogBoxName[0] ==
L'@')
1082 {
1083 sp =
_wtoi(wszDialogBoxName + 1);
1084 }
1085
1087
1089 if (applet)
1090 {
1096 AppDlgFindData findData;
1097
1098
1100 {
1101 while ((++
sp) != applet->
count)
1102 {
1104
1106 break;
1107 }
1108 }
1109
1110 if (applet->
count == 1 ||
1112 {
1114 }
1115
1117
1118 if (sp < applet->
count)
1119 {
1121 if (!aCPLPath)
1123
1125 if (!aCPLName)
1127
1129 if (!aCPLFlags)
1131
1132 findData.szAppFile = applet->
cmd;
1134 findData.aCPLName = aCPLName;
1135 findData.aCPLFlags = aCPLFlags;
1136 findData.hRunDLL = applet->
hWnd;
1137 findData.hDlgResult =
NULL;
1138
1139
1141 if (findData.hDlgResult)
1142 {
1144 }
1145 else
1146 {
1149 Control_ShowAppletInTaskbar(applet,
sp);
1150
1151 if (extraPmts[0] ==
L'\0' ||
1153 {
1155 }
1156
1159 }
1160 }
1161
1163
1164 if (bActivated)
1166 }
1167
1170#endif
1171}
#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)
int WINAPI StrCmpIW(const WCHAR *str, const WCHAR *comp)
CPlApplet * Control_LoadApplet(HWND hWnd, LPCWSTR cmd, CPanel *panel)
void Control_UnloadApplet(CPlApplet *applet)
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
#define memmove(s1, s2, n)
unsigned __int3264 UINT_PTR
_Check_return_ _CRTIMP int __cdecl _wtoi(_In_z_ const wchar_t *_Str)
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)