|
How can one use *.fon font in VC++ application?
How to load fon font?
Thanks
|
|
|
|
|
I have this below CString data
<br />
CString m_str; <br />
m_str += "CAST";<br />
I need to change m_str to hex CString data. So I use this below function
<br />
CString m_hexstr<br />
m_hexstr.Format("%02X", m_str); <br />
So I get m_hexstr = {"BC3E5C"}
But I want to ask about how to change back from hex CString data {"BC3E5C"} to CSting data {"CAST"}.
Thank you for your reply.
|
|
|
|
|
I think I get the wrong answer.
Because "CAST" should result in 8 letters. (2 per ASCII character).
I think Format does not work ok this way.
So I want to ask. Is there a way to convert m_str = {"CAST"} to hex character and how to change back?
Thank you for your reply.
|
|
|
|
|
You want to save your strings characters as their ASCII-representation to a hexadecimal base?
Converting into hex is easy: Make a std::map<char, string> and look up the translation.
For the opposite direction, use another std::map<string char> and look up the chars for every hex-digit.
|
|
|
|
|
loop on the chars, read each char, cast it into an int, format that int into a string using %2X and concatenate all the resulting chars
Same idea to bo back but reversed
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Does WinCE support ownerdraw list view controls (CListCtrl)?
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
Hello Friends,
I have a very intresting question .
The problem is that i have written an application(.exe) it uses a .dll file i.e few functionality are provided in the dll file . as the file is used it is loaded dynamically now the problem is that i want to change this dll without unloading the application is this possible??? i have done some changes in the dll so without unloading the application can i unload the dll and again reload it. but as the dll is loaded it is not replaced by the new dll in that folder .
can any one suggest me a option for it????
i have to change the dll and not swap.see i have a folder called ABC in this abc folder i am having my application app.exe and all called xyz.dll.
now my applixcation app.exe is running and it is using the xyz.dll.so the xyz.dll is loaded .Now i want to replace this xyz.dll in the folder and that loaded in the application i.e is app.exe. is it possible???
Tryout are also welcome.Please suggest some technique to do this
|
|
|
|
|
When I asked you to stop asking here over and over, I did not mean for you to write the same question to me privately. I've told you several times here I don't think you can do it, did you expect a different answer by emailing me ?
I don't think it can be done, because the OS owns the file while it is open. I also suspect the folder is more Windows/System than ABC, why else would you be unable to stop the program from running for 10 seconds ?
If I had an answer, I would have given it, as would many others here. You asked again today AFTER someone replied. Has it occured to you that no-one has helped you because no-one is able to ?
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
hey come why are u so angry???
when i came today i saw alot of queries and mine was far back . i thought i might have been missed by some persone who knows something more like u did. so i just posted the query today. and by mistake due to the net connection i have posted it twice.
any way i think u should cool down this query being really important for me i was willing the solution from u and thought that u might not check it as today is new day and there was no reply from u when i have wrtten a reply over there so i just thought that u might have missed it so i just mailed u . if u dont like these mails why do u visit such site???else give the mail id which u dont like. else u should promptly reply that u dont know the further part.
any way
dont worry. i wont mail u any more
|
|
|
|
|
maxyi wrote:
if u dont like these mails why do u visit such site???
AFAIK, one of the reasons Christian visits this site is to help people like you. If you read the messages he posts or article he writes you'll quickly find out that he knows what he is saying. His reply to you contains an answer, and even if this answer ("the file is controlled by OS, so there's no guaranteed way of replacing the DLL") is not what you want to hear, you just have to accept it. Posting the same question again and again is not the best way of getting help. Why not reading (MSDN documentation[^])?
Christian pointed you to another aspect of your problem: sometimes instead of solving the problem directly it's better to check if it's correct to make such task at all. If somebody comes with a question "how do I write to a file that is exclusively open by other user", it's silly to search for a solution: the task is invalid and will be denied by any decent operating system. So I suggest you look at your problem once again: why do you need to break into a field that is controlled by an operating system? Can't you revise your problem instead of waiting for somebody to show you a back door?
Best regards
Vagif Abilov
MCP (Visual C++)
Oslo, Norway
Hex is for sissies. Real men use binary. And the most hardcore types use only zeros - uppercase zeros and lowercase zeros.
Tomasz Sowinski
|
|
|
|
|
:-Dyou mean you want to change the dll file while the application which load the dll is running.
I think it is impossible to complete it directly.
I am I,Who is who,I am who,Who am I
|
|
|
|
|
As it's already established that Windows will probably not let you unload, unlock, swap, and reload the same DLL file, can't you just make it load a differently named DLL that has the same functionality
I.e.
* App using xyz.dll in folder blegh\
* you add xyz2.dll into folder blegh\
* you select a "load new dll" option in the app, and pick xyz2.dll
* App unloads xyz.dll and loads xyz2.dll instead
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
I suspect if he could do that, he could also stop his program, and that the reason he cannot is that he is trying to write something destructive. The fact that he's not denied it when I've suggested this twice enhances my view that this is the case. Why else could he not stop his app for 10 seconds ?
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
this is first time i see the Q, and, it is your rights to post your Q again if no right reply, why not? what is the purpose of the forum, who is god here - you are one of them.
i checked all replies to your Q, so far, all of them are funny - they have no any programming experience but always imitate as teachers on the forum.
of course it is possible to close and re-load a dll, because the app is developped by you.
for unix, dos, windows and any other formal OS, all have functionalities called "dynamically using libraries" - basically are load, close and reload dll etc.
unix is more powerful in process controlling, windows has less.
read related topic to find if u can dynamically use your dll in your case (not always allowed).
good luck.
includeh10
|
|
|
|
|
thanks dear friend .
thanks alot .
are seeing few thing in reply is good but there is no particular solutuin for my problem so i just posted my query
again.
any way i dont want o give any explanation.
the reply from cristain was bit harsh so i just wrote back
i am not intrested in writing any replies or any thing like that
bye tahnks for ur reply
|
|
|
|
|
Hello Friends,
I have a very intresting question .
The problem is that i have written an application(.exe) it uses a .dll file i.e few functionality are provided in the dll file . as the file is used it is loaded dynamically now the problem is that i want to change this dll without unloading the application is this possible??? i have done some changes in the dll so without unloading the application can i unload the dll and again reload it. but as the dll is loaded it is not replaced by the new dll in that folder .
can any one suggest me a option for it????
Tryout are also welcome.Please suggest some technique to do this
|
|
|
|
|
I think you can use the lib file,not using the loadlibrary.
I used the lib file,and it is very convevient to chang the dll file.
I am I,Who is who,I am who,Who am I
|
|
|
|
|
can u just tell me any thing more about this???
|
|
|
|
|
1. Please don't ask the same question day after day, let alone twice in the space of a moment.
2. We established yesterday that even if your app unloads the dll, it may still have a lock on it. In that case, I thought we established that it's unlikely you can get the OS to let you replace the file.
3. It seems odd to me that you wrote an app and you can't stop it for 5 seconds. Are you sure you're not trying to write a virus that replaces gina.dll or something ?
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
hey come why are u so angry???
when i came today i saw alot of queries and mine was far back . i thought i might have been missed by some persone who knows something more like u did. so i just posted the query today. and by mistake due to the net connection i have posted it twice.
any way i think u should cool down this query being really important for me i was willing the solution from u and thought that u might not check it as today is new day and there was no reply from u when i have wrtten a reply over there so i just thought that u might have missed it so i just mailed u . if u dont like these mails why do u visit such site???else give the mail id which u dont like. else u should promptly reply that u dont know the further part.
any way
dont worry. i wont mail u any more
|
|
|
|
|
maxyi wrote:
hey come why are u so angry???
He's quite polite, you instead are a stupid f***.
maxyi wrote:
and by mistake due to the net connection i have posted it twice.
You have a [delete] button, thus no excuse.
maxyi wrote:
any way i think u should cool down this query being really important for me i
If that's amazingly important, why don't you suggest money in return ?
maxyi wrote:
from u and thought that u might not check it as today is new day and there was no reply from u when i have wrtten a reply over there so i just thought that u might have missed it so i just mailed u .
Oh Oh... Infinite loops.
maxyi wrote:
if u dont like these mails why do u visit such site???
Now you are ordering people not to visit CodeProject.
What is your background to boast and come with such strong ideas ?
maxyi wrote:
else u should promptly reply that u dont know the further part.
If that wasn't for people like Christian spending a few hours each day to answer freely people and share his best knowledge of computer programming, you moron wouldn't even be able to log on Codeproject, because there wouldn't be Codeproject at all without these guys.
Back to real work : D-22.
|
|
|
|
|
the language is ansi c language,not C++
I mean not to use the global resource include the file,reg and global variable
I am I,Who is who,I am who,Who am I
|
|
|
|
|
If this is Win32: Sharing Files and Memory[^]. It's worthwhile to note that memory allocated in a process can be shared between the threads of the process. So you can pass around parameters to your thread indicating where in memory to look for your data, but that's cumbersome, and prone to errors if you goof.
You could just pass the variables as parameters into your thread entry points.
|
|
|
|
|
I know.But the parameter is the LPVOID data type.I had tried to change the type by using (int *),but I got a wrong value.
Can you tell me how to complete it using parameter?
I am I,Who is who,I am who,Who am I
|
|
|
|
|
Are you using CreateThread , or _beginthread ?
Either way, you can pass the parameter by casting it to void* :
DWORD dwThreadId = 0;
HANDLE hThread = CreateThread(NULL, 0, entry, (void*)param, 0, &dwThreadId);
If you're using functions from the C library, you SHOULD use _beginthread , and use the multithreaded C library:
unsigned long hThread = _beginthread(entry, 0, (void*)param);
Your entry function should look like:
DWORD entry(void* pParam)
{
return 0;
}
|
|
|
|