|
Thanks for ur support may i know how can use RegistryRegQueryValueExW with sample..as im a newbie and im struggling with this unicode can u suggest me any article on how to use Unicode in my applications.....
|
|
|
|
|
what does RegistryRegQueryValueEx have to do with downloading files?
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Ya...this is a different doubt...Please try to calrify...
|
|
|
|
|
???
I don't understand what you're saying.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
The doubt What im going to ask is not related to Filedownload it is related to Registry access ...ie
Please let me know how can iread a value from registry using RegQueryValueExW() with sample.... and please let me know how can i use unicode in my applications ..really im struggling with this unicode....
|
|
|
|
|
You should start a new thread for this question.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
hi all
I am developing a directshow application through mfc .I am getting the error
Error 1 error C2664: 'ATL::CStringT<basetype,stringtraits>::CStringT(const VARIANT &)' : cannot convert parameter 1 from 'WCHAR [128]' to 'const VARIANT &' d:\visual c++ programs\mfc\pplayer\player.cpp 102
in the function
CString GetFilterName(IBaseFilter* pBF)
{
ASSERT(pBF!=NULL);
FILTER_INFO fi;
memset(&fi,0,sizeof(fi));
if(pBF!=NULL)
{
VERIFY(SUCCEEDED(pBF->QueryFilterInfo(&fi)));
}
return fi.achName; //here I am getting the error
}
please help me why i m getting this error
|
|
|
|
|
I'm guessing that you're using ASCII strings. fi.achName is a wide string, so isn't compatible with ASCII strings. When you attempt to pass it back as a CString, the compiler needs to find a constructor that will create an ASCII CString from a wide string. It can't, because there isn't one.
You need to convert the wide-string to a TCHAR string. The easiest way is to #include <atlconv.h> and convert the string like this:
return CW2CT(fi.achName);
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I have unsigned char variable that store hex values for image. but when i wrote it in binary file and save as jpg, the image is invalid. how exactly the way to convert hex to image?
|
|
|
|
|
suggesting some checkpoints.
1. is the hex string including file header part for jpg format?
2. is your code of (HEX string -> BYTE) ok?
3. which writing function do you use? fwrite or fputc etc?
...
|
|
|
|
|
thank you for the reply. here are my answers:
1.i don't know about the value of file header. how do i get it?actually the hex string values i retrieved from database and assign to CString variable.
2.do you mean i have to convert hex string to BYTE?
3.i am using fwrite function which i assigned hex string values into unsigned char variable
|
|
|
|
|
Basically you need a better undestanding on fundamental C/C++ data types. For instance your point (2) doesn't make any sense.
Possibly you're retrieving binary data, representing an image from the database. In such case, you've just to make sure that:
- The database contains what is expectded (i.e. what is the format of the image inside the db (
raw data , bitmap , jpeg ,...)?). - Your function(s) correctly transfer on file the data retrived from the database (i.e. the
binary content of the file matches the one of the record in the database).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
refine below
1. (JPG format may not have file header section; i might be wrong. )
1'. check byte sequence of original, database and generated from your code.
annese wrote: 2.do you mean i have to convert hex string to BYTE?
generally so. you need convert char[2] to unsigned char
like "FF" (char[]) -> 0xff (unsigned char)
annese wrote: 3.i am using fwrite function which i assigned hex string values into unsigned char variable
good. but to say, you must fwrite array of BYTE above.
example)
char HEX[9] = "FFD8FFE1"; //original string
BYTE BIN[4] = { 0xff,0xd8,0xff,0xe1 }; // converted one
x fwrite(HEX, 1, 8, fp); // wrong!
o fwrite(BIN, 1, 4, fp); // good!
check further.
|
|
|
|
|
thanks for the very helpful info
|
|
|
|
|
I got too long hex string because it is an image file, size about 4k. If there any standard function to convert hex to binary? If not it will take some times to convert it? tq
|
|
|
|
|
What is CPU Time?
Some body tell me that this program use 10% CPU Time.
what does him mean?
and
How can I write the code for check CPU Time of my program,
what's function support this issue.
|
|
|
|
|
Max++ wrote: What is CPU Time?
Here[^] you go! This was my first hit when I searched.
Max++ wrote: How can I write the code for check CPU Time of my program,
You can use types in time.h[^] to find the execution time.
|
|
|
|
|
Max++ wrote: Some body tell me that this program use 10% CPU Time.
That means that the program was using the CPU 10% of the time it was running. So, if it ran for 10 minutes, I would have used 1 minute of CPU time.
Max++ wrote: How can I write the code for check CPU Time of my program,
Use GetProcessTimes [^]. The total CPU time your program has used is the sum of the user and kernel times. The total elapsed time is the creation time substracted from the current time. You can express the CPU time as a % by dividing the total CPU time by hte elapsed time.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I want to detect whether a language pack is available, on selecting a particular language in my MFC application.Can anyone help me to sort out this problem??
It may be done through registry keys,but i am not getting that how to do it?
Plz help me.
Thanks..........
|
|
|
|
|
Look into this registry entry:
HKLM\SYSTEM\CurrentControlSet\Control\Nls\Language\
You are going to have to traverse through the entries and find the language code you are looking for. There should be code out on the web on how to traverse through registry entries to find a particular key.
Here you will find a list of Windows language codes:
http://www.science.co.il/Language/Locale-Codes.asp[^]
|
|
|
|
|
So what is the first windows' parent windows.
BTW, I create the first window myself, not using the framework.
BOOL CWnd::Create(LPCTSTR lpszClassName,
LPCTSTR lpszWindowName, DWORD dwStyle,
const RECT& rect,
CWnd* pParentWnd, UINT nID,
CCreateContext* pContext)
{
ASSERT(pParentWnd != NULL);
ASSERT((dwStyle & WS_POPUP) == 0);
return CreateEx(0, lpszClassName, lpszWindowName,
dwStyle | WS_CHILD,
rect.left, rect.top,
rect.right - rect.left, rect.bottom - rect.top,
pParentWnd->GetSafeHwnd(), (HMENU)(UINT_PTR)nID, (LPVOID)pContext);
}
|
|
|
|
|
use CWnd::CreateEx
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
The code failed, why?
CWnd *pWnd=new CWnd;
LPCTSTR pClassName = AfxRegisterWndClass(CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW);
BOOL b = pWnd->CreateEx(0, pClassName, L"MyWnd",
WS_VISIBLE|WS_OVERLAPPEDWINDOW,
CRect(0,0,100,100), NULL, 1);
|
|
|
|
|
Hi everyone.
I want write a problem to edit binary file, but it is too slow when open big file, Can who send me one source code to me.
|
|
|
|
|
the source code is too big, the email can not open it.
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|