Click here to Skip to main content
16,019,876 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello

I'm trying to Invoke a UPnPService:
C#
string result = string.Empty;
object[] vInActionArgs = new object[2];
vInActionArgs[0] = "1";
vInActionArgs[1] = "BrowseMetadata";
object vOutActionArgs = null;
_service.InvokeAction("Browse", vInActionArgs, ref vOutActionArgs);


I have the Action-Table copied from Intel Device Spy:
Action name	Browse
Argument 1	(string) ObjectID
Argument 1 ASV	A_ARG_TYPE_ObjectID
Argument 10	(ui4) UpdateID
Argument 10 ASV	A_ARG_TYPE_UpdateID
Argument 2	(string) BrowseFlag
Argument 2 ASV	A_ARG_TYPE_BrowseFlag
Argument 3	(string) Filter
Argument 3 ASV	A_ARG_TYPE_Filter
Argument 4	(ui4) StartingIndex
Argument 4 ASV	A_ARG_TYPE_Index
Argument 5	(ui4) RequestedCount
Argument 5 ASV	A_ARG_TYPE_Count
Argument 6	(string) SortCriteria
Argument 6 ASV	A_ARG_TYPE_SortCriteria
Argument 7	(string) Result
Argument 7 ASV	A_ARG_TYPE_Result
Argument 8	(ui4) NumberReturned
Argument 8 ASV	A_ARG_TYPE_Count
Argument 9	(ui4) TotalMatches
Argument 9 ASV	A_ARG_TYPE_Count
Return argument	<none>

I always get the folloing exception:
A user-supplied component or subscriber raised an exception (Exception from HRESULT: 0x80040208)

I think I parse the inArgs wrong, but how I have to do it right?

Thanks for help :)
Posted
Updated 29-Sep-10 4:02am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900