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 pchLastUnquotedSpace = &wszCmd[
i];
1021 break;
1022 }
1023 }
1024
1025
1026
1027 if (!pchFirstComma)
1028 {
1029
1030
1031 if (pchLastUnquotedSpace)
1032 {
1033 int nSpaces = 0;
1034
1035 while (pchLastUnquotedSpace[nSpaces] ==
L' ')
1036 nSpaces++;
1037
1039 StringCchCopyW(wszDialogBoxName, nLen + 1, pchLastUnquotedSpace + nSpaces);
1040 }
1041
1042 else
1043 {
1045 }
1046 }
1047
1048
1049
1050
1051
1052 else
1053 {
1054
1055
1056 if (!pchSecondComma)
1057 pchSecondComma = wszCmd + nLen;
1058
1061 nLen + 1,
1062 pchFirstComma + 1,
1063 pchSecondComma - pchFirstComma - 1);
1064
1065 if (pchSecondComma != wszCmd + nLen)
1066 {
1067 extraPmts = pchSecondComma + 1;
1068 }
1069 }
1070
1071
1074
1075 while ((
ptr =
StrChrW(wszDialogBoxName,
'"')))
1077
1078 if (wszDialogBoxName[0] ==
L'@')
1079 {
1080 sp =
_wtoi(wszDialogBoxName + 1);
1081 }
1082
1084
1086 if (applet)
1087 {
1093 AppDlgFindData findData;
1094
1095
1097 {
1098 while ((++
sp) != applet->
count)
1099 {
1101
1103 break;
1104 }
1105 }
1106
1107 if (
sp >= applet->
count && wszDialogBoxName[0] ==
L'\0')
1108 {
1110 }
1111
1113
1114 if (sp < applet->
count)
1115 {
1117 if (!aCPLPath)
1119
1121 if (!aCPLName)
1123
1125 if (!aCPLFlags)
1127
1128 findData.szAppFile = applet->
cmd;
1130 findData.aCPLName = aCPLName;
1131 findData.aCPLFlags = aCPLFlags;
1132 findData.hRunDLL = applet->
hWnd;
1133 findData.hDlgResult =
NULL;
1134
1135
1137 if (findData.hDlgResult)
1138 {
1140 }
1141 else
1142 {
1145 Control_ShowAppletInTaskbar(applet,
sp);
1146
1147 if (extraPmts[0] ==
L'\0' ||
1149 {
1151 }
1152
1155 }
1156 }
1157
1159
1160 if (bActivated)
1162 }
1163
1166#endif
1167}
#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)