Direct Input : Action Mapper 
Author Message
 Direct Input : Action Mapper

Anyone added multiple users to the action mapper VB
example code for Direct Input?  Wish there was a multi
mapper example done in VB like the one in C++.

Anyway, just having issues figuring out how to add a
second user to the program.



Sat, 18 Dec 2004 07:56:00 GMT  
 Direct Input : Action Mapper
Just another note, the section of code I'm having
problems with is noted below.  I can't change the
UserCount to 2 without getting an invalid paramater error.

Function ConfigureDevices(Optional bAllowEdit = False)
    ReDim m_cdParams.ActionFormats(0)
    ReDim m_cdParams.UserNames(0)

    Dim i As Long

    m_cdParams.ActionFormats(0) = m_diaf
    m_cdParams.FormatCount = 1
    m_cdParams.UserCount = 1
    m_cdParams.UserNames(0) = "test"

    If bAllowEdit Then
        m_DI.ConfigureDevices 0, m_cdParams, DICD_EDIT
    Else
        m_DI.ConfigureDevices 0, m_cdParams, DICD_DEFAULT
    End If



Sat, 18 Dec 2004 12:10:45 GMT  
 Direct Input : Action Mapper
If UserCount exceeds the number of names in the UserNames() array, the
method will fail with DIERR_INVALIDPARAM.  Are you in fact adding another
string to the array when setting user count to 2?  Are you adding another
element to the array to hold this string?  Lets see the code that is broken,
rather than the code that works.

--
Eric DeBrosse
http://www.mvps.org/vbdx/
Microsoft Visual Basic DirectX MVP

The opinions expressed in this message are my own personal views and
do not reflect the official views of Microsoft Corporation. The MVP program
does not constitute employment or contractual obligation with Microsoft.


Quote:
> Just another note, the section of code I'm having
> problems with is noted below.  I can't change the
> UserCount to 2 without getting an invalid paramater error.

> Function ConfigureDevices(Optional bAllowEdit = False)
>     ReDim m_cdParams.ActionFormats(0)
>     ReDim m_cdParams.UserNames(0)

>     Dim i As Long

>     m_cdParams.ActionFormats(0) = m_diaf
>     m_cdParams.FormatCount = 1
>     m_cdParams.UserCount = 1
>     m_cdParams.UserNames(0) = "test"

>     If bAllowEdit Then
>         m_DI.ConfigureDevices 0, m_cdParams, DICD_EDIT
>     Else
>         m_DI.ConfigureDevices 0, m_cdParams, DICD_DEFAULT
>     End If



Sun, 19 Dec 2004 01:16:55 GMT  
 Direct Input : Action Mapper
Code that fails below: Array is enlarged, then set, then
usercount set to 2.

Quote:
>> Function ConfigureDevices(Optional bAllowEdit = False)
>>     ReDim m_cdParams.ActionFormats(0)
>>     ReDim m_cdParams.UserNames(2)

>>     Dim i As Long

>>     m_cdParams.ActionFormats(0) = m_diaf
>>     m_cdParams.FormatCount = 1
>>     m_cdParams.UserCount = 2
>>     m_cdParams.UserNames(0) = "test"
>>     m_cdParams.UserNames(1) = "test"

>>     If bAllowEdit Then
>>         m_DI.ConfigureDevices 0, m_cdParams, DICD_EDIT
>>     Else
>-----Original Message-----
>If UserCount exceeds the number of names in the UserNames
() array, the
>method will fail with DIERR_INVALIDPARAM.  Are you in
fact adding another
>string to the array when setting user count to 2?  Are
you adding another
>element to the array to hold this string?  Lets see the

code that is broken,
Quote:
>rather than the code that works.

>--
>Eric DeBrosse
>http://www.mvps.org/vbdx/
>Microsoft Visual Basic DirectX MVP

>The opinions expressed in this message are my own
personal views and
>do not reflect the official views of Microsoft

Corporation. The MVP program
Quote:
>does not constitute employment or contractual obligation
with Microsoft.





- Show quoted text -

Quote:
>> Just another note, the section of code I'm having
>> problems with is noted below.  I can't change the
>> UserCount to 2 without getting an invalid paramater
error.

>> Function ConfigureDevices(Optional bAllowEdit = False)
>>     ReDim m_cdParams.ActionFormats(0)
>>     ReDim m_cdParams.UserNames(0)

>>     Dim i As Long

>>     m_cdParams.ActionFormats(0) = m_diaf
>>     m_cdParams.FormatCount = 1
>>     m_cdParams.UserCount = 1
>>     m_cdParams.UserNames(0) = "test"

>>     If bAllowEdit Then
>>         m_DI.ConfigureDevices 0, m_cdParams, DICD_EDIT
>>     Else
>>         m_DI.ConfigureDevices 0, m_cdParams,
DICD_DEFAULT
>>     End If

>.



Sun, 19 Dec 2004 05:21:19 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. how to detect how long without any input since last input action

2. how to detect how long without any input since last input action

3. Detecting Duplicate Entries On Direct Input

4. direct input vs BCP

5. Direct Input in VB 5 from Soundblaster live

6. Shell and re-directed input

7. getting a direct input from excel table

8. Direct Input problem

9. direct input error

10. Knowing program input while using Direct Draw 7.

11. Direct Input :: Foot Pedal Axis question

12. direct input

 

 
Powered by phpBB® Forum Software