Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
957da4ee
Commit
957da4ee
authored
Nov 29, 2017
by
Zebediah Figura
Committed by
Alexandre Julliard
Nov 30, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Implement the DeleteGroup() command for Progman DDE.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
83ca4e20
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
6 deletions
+26
-6
dde.c
dlls/shell32/dde.c
+26
-0
progman_dde.c
dlls/shell32/tests/progman_dde.c
+0
-6
No files found.
dlls/shell32/dde.c
View file @
957da4ee
...
...
@@ -120,6 +120,7 @@ static WCHAR *get_programs_path(WCHAR *name)
static
DWORD
PROGMAN_OnExecute
(
WCHAR
*
command
,
int
argc
,
WCHAR
**
argv
)
{
static
const
WCHAR
create_groupW
[]
=
{
'C'
,
'r'
,
'e'
,
'a'
,
't'
,
'e'
,
'G'
,
'r'
,
'o'
,
'u'
,
'p'
,
0
};
static
const
WCHAR
delete_groupW
[]
=
{
'D'
,
'e'
,
'l'
,
'e'
,
't'
,
'e'
,
'G'
,
'r'
,
'o'
,
'u'
,
'p'
,
0
};
if
(
!
strcmpiW
(
command
,
create_groupW
))
{
...
...
@@ -134,6 +135,31 @@ static DWORD PROGMAN_OnExecute(WCHAR *command, int argc, WCHAR **argv)
HeapFree
(
GetProcessHeap
(),
0
,
path
);
}
else
if
(
!
strcmpiW
(
command
,
delete_groupW
))
{
WCHAR
*
path
,
*
path2
;
SHFILEOPSTRUCTW
shfos
=
{
0
};
int
ret
;
if
(
argc
<
1
)
return
DDE_FNOTPROCESSED
;
path
=
get_programs_path
(
argv
[
0
]);
path2
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
strlenW
(
path
)
+
2
)
*
sizeof
(
*
path
));
strcpyW
(
path2
,
path
);
path2
[
strlenW
(
path
)
+
1
]
=
0
;
shfos
.
wFunc
=
FO_DELETE
;
shfos
.
pFrom
=
path2
;
shfos
.
fFlags
=
FOF_NOCONFIRMATION
;
ret
=
SHFileOperationW
(
&
shfos
);
HeapFree
(
GetProcessHeap
(),
0
,
path2
);
HeapFree
(
GetProcessHeap
(),
0
,
path
);
if
(
ret
||
shfos
.
fAnyOperationsAborted
)
return
DDE_FNOTPROCESSED
;
}
else
{
FIXME
(
"unhandled command %s
\n
"
,
debugstr_w
(
command
));
...
...
dlls/shell32/tests/progman_dde.c
View file @
957da4ee
...
...
@@ -347,10 +347,8 @@ static void test_progman_dde(DWORD instance, HCONV hConv)
/* DeleteGroup Test */
error
=
dde_execute
(
instance
,
hConv
,
"[DeleteGroup(Group1)]"
);
todo_wine
{
ok
(
error
==
DMLERR_NO_ERROR
,
"expected DMLERR_NO_ERROR, got %u
\n
"
,
error
);
ok
(
!
check_exists
(
"Group1"
),
"directory should not exist
\n
"
);
}
/* Compound Execute String Command */
sprintf
(
comptext
,
"[CreateGroup(Group3)][AddItem(%s,f1g3Name)][AddItem(%s,f2g3Name)]"
,
f1g3
,
f2g3
);
...
...
@@ -365,10 +363,8 @@ static void test_progman_dde(DWORD instance, HCONV hConv)
}
error
=
dde_execute
(
instance
,
hConv
,
"[DeleteGroup(Group3)]"
);
todo_wine
{
ok
(
error
==
DMLERR_NO_ERROR
,
"expected DMLERR_NO_ERROR, got %u
\n
"
,
error
);
ok
(
!
check_exists
(
"Group3"
),
"directory should not exist
\n
"
);
}
/* Full Parameters of Add Item */
/* AddItem(CmdLine[,Name[,IconPath[,IconIndex[,xPos,yPos[,DefDir[,HotKey[,fMinimize[fSeparateSpace]]]]]]]) */
...
...
@@ -392,10 +388,8 @@ static void test_progman_dde2(DWORD instance, HCONV hConv)
ok
(
check_window_exists
(
Group2Title
),
"window not created
\n
"
);
error
=
dde_execute
(
instance
,
hConv
,
"[DeleteGroup(Group2)]"
);
todo_wine
{
ok
(
error
==
DMLERR_NO_ERROR
,
"expected DMLERR_NO_ERROR, got %u
\n
"
,
error
);
ok
(
!
check_exists
(
"Group2"
),
"directory should not exist
\n
"
);
}
}
START_TEST
(
progman_dde
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment