I have just noticed that the registry of windows have saved parameters from vdj. So it could be interesting to have access to them for plugins. I'm sure in C++ we can do it but is it possible in the plugin?
(Example of function: RegSetValueEx() )
Interests:
* FadeLength
* Crossfader_behavior
* etc..
Besides for FadeLength, we can define another value in the registry as the ones imposed by the settings of vdj:
FadeLength=Time (in seconds)*Frequency_of_VDJ where Frequency_of_VDJ=44100
(in decimal value !!)
Try it !! Vdj shows "other" for FadeLength in the settings !!
And for "Crossfader", we have the 3 values that I used in my plugin XFade for Crossfader_behavior {0,1,2}
(Example of function: RegSetValueEx() )
Interests:
* FadeLength
* Crossfader_behavior
* etc..
Besides for FadeLength, we can define another value in the registry as the ones imposed by the settings of vdj:
FadeLength=Time (in seconds)*Frequency_of_VDJ where Frequency_of_VDJ=44100
(in decimal value !!)
Try it !! Vdj shows "other" for FadeLength in the settings !!
And for "Crossfader", we have the 3 values that I used in my plugin XFade for Crossfader_behavior {0,1,2}
发表时间 Tue 14 Dec 04 @ 9:31 pm
The plugins *are* made of C++ code, so I don't see why it wouldn't be possible to access the registry... Just make sure you include all the proper libraries, and it should work.
macourteau
macourteau
发表时间 Wed 15 Dec 04 @ 7:37 am
Thx, I just want to be sure of it.
Unfortunately, we should know when "multi-users" in vdj settings is ON or OFF:
HKEY_CURRENT_USER | Software | VirtualDJ
or
HKEY_LOCAL_MACHINE |Software | VirtualDJ
I try to think about that (... value is in the registry : HKEY_LOCAL_MACHINE)
Unfortunately, we should know when "multi-users" in vdj settings is ON or OFF:
HKEY_CURRENT_USER | Software | VirtualDJ
or
HKEY_LOCAL_MACHINE |Software | VirtualDJ
I try to think about that (... value is in the registry : HKEY_LOCAL_MACHINE)
发表时间 Wed 15 Dec 04 @ 8:14 am
You can test the registry (in your plugin) to see if the "HKEY_CURRENT_USER\\Software\\VirtualDJ" key exists... if it does, then it's in multi-users, if it doesn't, use the "HKEY_LOCAL_MACHINE\\Software\\VirtualDJ" key... ;)
macourteau
macourteau
发表时间 Wed 15 Dec 04 @ 9:21 am
Here is the function to get the value of the DWORD
HKEY_LOCAL_MACHINE\SOFTWARE\VirtualDJ\Multiusers
from the registry of windows
/////////////////////////////////////////////////////////
DWORD get_value_DWORD_registry()
{
DWORD value = 0;
HKEY hKey = NULL;
REGSAM sam = KEY_READ;
char* pszKey = "SOFTWARE\\VirtualDJ";
if ( ERROR_SUCCESS != RegOpenKeyEx ( HKEY_LOCAL_MACHINE, pszKey, 0, sam, &hKey))
{
return value; // assume "default" if key is not present or readable
}
else
{
DWORD dwType = REG_DWORD;
DWORD dwSize = sizeof ( DWORD);
if ( ERROR_SUCCESS != RegQueryValueEx ( hKey, "Multiusers", NULL, &dwType, ( LPBYTE) &value, &dwSize))
{
// error
}
}
RegCloseKey ( hKey);
return value;
}
///////////////////////////////////////////////////////////////////
Enjoy it !!
HKEY_LOCAL_MACHINE\SOFTWARE\VirtualDJ\Multiusers
from the registry of windows
/////////////////////////////////////////////////////////
DWORD get_value_DWORD_registry()
{
DWORD value = 0;
HKEY hKey = NULL;
REGSAM sam = KEY_READ;
char* pszKey = "SOFTWARE\\VirtualDJ";
if ( ERROR_SUCCESS != RegOpenKeyEx ( HKEY_LOCAL_MACHINE, pszKey, 0, sam, &hKey))
{
return value; // assume "default" if key is not present or readable
}
else
{
DWORD dwType = REG_DWORD;
DWORD dwSize = sizeof ( DWORD);
if ( ERROR_SUCCESS != RegQueryValueEx ( hKey, "Multiusers", NULL, &dwType, ( LPBYTE) &value, &dwSize))
{
// error
}
}
RegCloseKey ( hKey);
return value;
}
///////////////////////////////////////////////////////////////////
Enjoy it !!
发表时间 Thu 06 Jan 05 @ 3:15 pm
Very good work!!
发表时间 Thu 06 Jan 05 @ 3:48 pm
The forum cut a backslash between SOFTWARE and VirtualDJ, there are two backslash!!
发表时间 Thu 06 Jan 05 @ 4:11 pm