-
Code:
DirectPlay8LobbyClient.GetCountLocalPrograms
Retrieves the number of lobbied applications that are registered on the system.
GetCountLocalPrograms(guidApplication As String) As Long
Parts
guidApplication
String value specifying the GUID of the lobbied application to enumerate.
Return Values
Returns the number of lobbied applications that are registered.
Built on Wednesday, October 04, 2000
My question, is what the hell should I use as the GUID. It doesnt make sense to give the GUID of the app since I want it to count the number of app, not just one app. I tried to give a null as in C++ but it doesnt work. It should be an option. I check C++ and it's an option for them.
-
I don't know much about DPlay (nothing :-( )
but I think you should try an Empty string. Becuase If it's an optin to C it should be one in VB too, when it is declared as ByRef, it wont just take a 0, so try to use an empty string.
-
The GUID is the global unique identifier of your app. You can get one using the GuidGen app found somewhere in your VS folder ;) Well, that indicates your app and is only used by DPlay to make sure its your program running (or even enumerate the programs running, dunno...)
-
I know what the GUID is and how to get one, the problem is that this function is supposed to count the number of DirectX applications registered in your system. It doesnt make sense to ask for a program GUID if it's supposed to count O_o.
-
The SDK says its the "String value specifying the GUID of the lobbied application to enumerate." Sorry no idea...
-
Why don't you try the GUID of your app and see what happens?
-
I already tried that and I also tried the GUID of one of the DirectPlay registered programs I had to no avail. It gave me "Automation error"
I did it that way :
Code:
Option Explicit
Const AppGuid = "{99797420-F5F5-11CF-9827-00A0241496C8}"
Public dx As DirectX8
Public dpp As DirectPlay8Peer
Public dplc As DirectPlay8LobbyClient
Private Sub Form_Load()
Dim answer As Long
Set dx = New DirectX8
Set dplc = dx.DirectPlayLobbyClientCreate
answer = dplc.GetCountLocalPrograms(AppGuid)
End Sub
In theory, it should give me in a long the number of directX apps so that I can do a loop with GetLocalProgram(i). At least that's how all the other enums I saw in DX worked. Any idea where I could get infos? I tried various boards and no one seem to have a clue.