|
Help anyone? I can distil the problem to this: How do I get the pixel RGB color information from a webcam frame, and for all frames in a webcam feed(using any Cisual Studio C++ .NET 2003 program)?
|
|
|
|
|
Does anyone have a simple way of encoding a char* through the ASCII85 encoding and outputting another char*?
I hate to write my own if it's easy to do elsewhere.
Thanks
|
|
|
|
|
|
What would you do if ::OpenProcess(PROCESS_VM_READ, FALSE, dwProcessID) fails with error code 5 (Access is denied)? Where dwProcessID is a valid process ID. Is there any way to work around this problem?
|
|
|
|
|
OpenProcess(PROCESS_VM_READ, FALSE, GetCurrentProcessId());
if you want know dwProccessId in the example MSDN you can find one program that you can see dwProccessId from another proccess
|
|
|
|
|
I would use the OpenProcessToken() /LookupPrivilegeValue() /AdjustTokenPrivileges() trio to gain access.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
Could you please explain a bit more?
|
|
|
|
|
|
I am confused on the use of htmldocument and htmlelementevents in MSHTML IE.
Do the element events bubble upto the document level?i.e. does implementing the htmldocumentevent interface ensure that the events fired at all the individual elements will be trapped?
If so,is there some way to know that the event of which element got fired in the Invoke method?
|
|
|
|
|
Hi all
I am working on a Windows based application.
The application windows is a custiom shape window . (for that i used Layered windows & region ) its working fine.
In this program i would like to give shadow to application window. (like the shadows in Popup menus , such that it should blend neatly with the background pixels on other windows ).
looking for Valuable suggestions ..
Thanks & regards
Krishnan
If u can Dream... U can do it
-- modified at 9:52 Wednesday 3rd May, 2006
|
|
|
|
|
krishnadevank
I think I see your answer in the codeproject but i'm sorry i dont know address
in this program you can see shadow for controls and I think for window
|
|
|
|
|
|
hi Mike
Adding CS_DROPSHADOW is good idea .. But i want to chage the color of shadow
i want to give color shadows . Thats my problem.
Like this
The First color will be Color::Red
The Second wll be Color::Transparent
and i would like to paint it with a LinerGradientBrush.
What you think , Mike ?
If u can Dream... U can do it
-- modified at 1:54 Thursday 4th May, 2006
|
|
|
|
|
I am trying to write a registry value (using RegSetValueEx) of 2182 bytes for a particlular value name of RG_SZ type. But VC++ 6.0 is allowing me to write value of only 2007 bytes. If the size is greater than 2007 bytes then my application crashes with Access Violation.
HKEY hCLSID = HKEY_CURRENT_USER;
KEY phk;
LPCTSTR SKey = "SOFTWARE\\Rajni";
DWORD lpdw=NULL
if(RegCreateKeyEx(hCLSID,SKey,0,NULL,REG_OPTION_NON_VOLATILE,KEY_ALL_ACCESS ,NULL,&phk,&lpdw) == ERROR_SUCCESS)
cout<<"Key created\n";
else
cout<<"Key Creation Failed\n";
TCHAR data[8192];
const char * lpValueN = "name";
DWORD dwBufLen = 8192;
if(RegSetValueEx(phk,lpValueN,0,REG_SZ,(unsigned char *)strValue,dwBufLen) == ERROR_SUCCESS)
cout<<"\nSet Value Successful\n";
else
cout<<"\nSet Value Failed\n";
here strvalue is of 2182 character long..
Plz help !!!!!!!!!!
thanks and regsrds,
Rajni Kant
|
|
|
|
|
I would start with correcting the call to RegSetValueEx(...) - the last parameter is the (byte ) size of the data to be saved, not the size of the buffer used to store that data. When writing NUL -terminated strings, make sure the data length specified includes that terminating NUL .
See if that helps.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
I tested with length data but I think it's not problem
and I use LPTSTR for strValue but it doesnt work
|
|
|
|
|
I believe the problem is with either the data or the specified length of it. The following example works correctly writing 8K or raw data and as a NUL -terminiated string (8K + 1 in that case):
BYTE btaData[ 8192 + 1 ];
HKEY hKey = NULL;
::srand( time( NULL ) );
for( DWORD dwChar = 0; dwChar < 8192; dwChar++ )
{
do
{
btaData[ dwChar ] = ( ( rand() % 57 ) + 65 );
}
while( !::isalpha( btaData[ dwChar ] ) );
}
btaData[ 8192 ] = '0';
::RegCreateKeyExA( HKEY_CURRENT_USER, "Test", 0,
NULL, REG_OPTION_NON_VOLATILE,
( STANDARD_RIGHTS_REQUIRED | KEY_SET_VALUE |
KEY_CREATE_SUB_KEY ), NULL, &hKey, NULL );
if( hKey )
{
::RegSetValueExA( hKey, "TestValByte", 0, REG_BINARY, btaData, 8192 );
::RegSetValueExA( hKey, "TestValSZ", 0, REG_SZ, btaData, 8193 );
::RegCloseKey( hKey );
}
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
I think I find answer can you test this code please.
|
|
|
|
|
Rajni Kant,
I find your answer you can use 2 string and then use your function
or like this
TCHAR data[8192];
const char * lpValueN = "name";
DWORD dwBufLen = 8192;
const char *strValue;
strValue=(const char*)LocalAlloc(LPTR,2065);
strcat((char*)strValue,"");if example is 1032
dwBufLen =lstrlen(strValue);
RegSetValueEx(phk,lpValueN,0,REG_SZ,(unsigned char *)strValue,dwBufLen);
strcat((char*)strValue,"");//here 1032
dwBufLen =lstrlen(strValue);
RegSetValueEx(phk,lpValueN,0,REG_SZ,(unsigned char *)strValue,dwBufLen);
you get your answer I test with this way and I can save my value
|
|
|
|
|
can anyone have a guess of a file if it is some floating numbers or double or long double?
82 46 00 84 A1 FE 2B AF | 9D FA 0D 1D B3 A5 28 1A
96 B6 AC B8 B0 A5 8F 88 | BC A5 76 E1 FF C9 A1 8E
84 2D 4E D1 C8 BF 63 A5 | 75 C2 9F 6F ED 98 9B EF
C0 71 70 95 E3 C3 AC 21 | 0F D9 C7 A5 5C F3 FE 9F
18 7A 63 78 BE DA A1 36 | 7E 8A A4 C9 17 B2 22 E8
D5 69 77 EE E1 17 1F CF | 2D BF 53 D3 53 7A 9F DA
4E FD 0A F1 7C 6F 3B 53 | 99 12 6E 43 ED 78 6F 26
A4 6F 65 3D 57 36 80 AF | D1 26 5F BD 62 BF 21 58
....
a couple from here are converted well as floating numbers thru float *pnt, but others does not seem to work
9ine
|
|
|
|
|
unless you have a format to read the file, it can be anything and everything.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
that is the problem for me to solve!
9ine
|
|
|
|
|
It's just plain hexa values. It is impossible to say if that comes from an integer, a float, a double, a string or a blue cow (that to say it can be anything). What are those | symbols there ?
If one 'number' is 8 hexa symbols (2 chars), then the values are on 8 bytes which means that they are double or long double (they have the same number of bytes)
|
|
|
|
|
| is just to visually separate 8byte long sequences (old good Norton Commander has such a viewing thing)
it is not a string bits by sure as no of the printable characters at all in the file
it is a file with some data 100% I need to crack for what the numbers are
9ine
|
|
|
|
|
You won't be able to 'crack' the file if you don't know it's format. It's simply impossible to know what's contained in a binary file.
Maybe if it is a known file extension, you can find the file format on the web.
|
|
|
|