|
Is this on a Windows Domain (NT/2K/2003) or just W9x/ME?
If there's a domain controller involved, there is code which allows you to do this, although it's fairly convoluted. If the latter, then I think you'd have to have something application specific.
Steve S
|
|
|
|
|
well there is a domain controller.. all the servers should (at least) have win2k.. there are some nt4 clients, the rest is win2k..
Would be very nice if you sent me the piece of code..
"I'm from the South Bronx, and I don't care what you say: those cows look dangerous." U.S. Secretary of State Colin Powell at George Bush's ranch in Texas
|
|
|
|
|
I got the original code from Keith "Mr. Security" Brown, on the developmentor website, and made some minor changes; sent off-thread, since it's a large function
Steve S
|
|
|
|
|
sending it off-thread didn't work though.. i have already sent you an e-mail.. could you send it directly to my e-mail adress? (the one i've sent you the e-mail)
would be very nice..
"I'm from the South Bronx, and I don't care what you say: those cows look dangerous." U.S. Secretary of State Colin Powell at George Bush's ranch in Texas
|
|
|
|
|
I have this situation where I have to dynamically set the PATH variable used by the application.
Imagine I have 2 versions of mylib.dll:
c:\version1.0\mylib.dll
c:\version1.1\mylib.dll
My PATH variable is c:\version1.1; c:\version1.0
Now, my application links to mylib.lib, so whenever I startup my application, it is looking for the mylib.dll based on my PATH settings.
What I want to accomplish is to give the user the possibility to specify which version of the dll is going to be used by the application (via a dialog box).
So I thought the solution was to overrule the default PATH variable used by the application by my own one (c:\version1.0\mylib.dll needs to be used).
Is this possible? How to accomplish this?
Thanks in advance
Wim
|
|
|
|
|
Could you dynamically link to the DLL and use LoadLibrary() to specify the path for the DLL?
Systems AXIS Ltd - Software for Business ...
|
|
|
|
|
Hello,
I'm afraid that is not possible. Well, it might be possible, but the problem is that there are a lot of dll's invloved, and the references change over time.
So I really need to stick to the .lib usage.
|
|
|
|
|
Wim Jans wrote:
So I thought the solution was to overrule the default PATH variable used by the application by my own one (c:\version1.0\mylib.dll needs to be used).
Is this possible? How to accomplish this?
SetEnvironmentVariable() comes to mind.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Look at the "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths" entry in Registry. It's the modern approach now. You may use it for your purpose.
For example,
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\someserver.exe
@="S:\SRV7\Run\Release\bin\someserver.exe"
"Path"="S:\SRV7\Run\Release\bin\;S:\SRV7\Run\Release\dll\"
NOTE There is the separator ";" between pathes.
With best wishes,
Vita
|
|
|
|
|
Dear all
CString aStr="Learning 中文"; //a mixed English and Chinese string
Extracting each Chinese Character from The String and assign it to a UINT data type.
UINT aWord = ????
i use _MBCS not unicode
can someone tell me how?
|
|
|
|
|
Hi !
I upgraded my VC++ to 2003 cause the compiler now supports partial template specialization. But i now have the following problem:
Suppose the following code:
--- snip ---
class Test: public std::ostringstream {
public:
Test(const std::string& str);
};
Test::Test(const std::string& str)
: std::ostringstream()
{
*this << str;
}
---- snip ---
This does not compile (error C2679) cause the compiler could'nt find a matching binary operator. What the hell is going on here ? This code compiles on every other compiler i've used (gcc 2, gcc 3, VC6, VC7). Is the compiler buggier than before or am i missing something ?
Many thanks in advance,
Christian Prochnow
|
|
|
|
|
I'm just looking for an easy approach to build a dde server to provide changing data retrieved from internet ressources to other apps (e.g. Excel). Are there any good examples using the MS ddeml library
Alternatively an easy to use ActiveX-control wrapping this stuff would be great appreciated
Thanks for your help.
Mathefreak
|
|
|
|
|
If you want to make Excel a DDE Server
you can try something like this:
DDE Service : EXCEL
DDE Topic : Book1:Sheet1
DDE Item : R2C2 ( refers to Row2, Column2 )
or if you want to create DDE server,
see the SDK DDEML sample "Server Sample: DDE Server" in MSDN.
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
|
|
|
|
|
Hi All,
I'm a beginner. I tried using CToolTipCtrl as given in MSDN but tooltip display is not happening.This is what I've done.
CToolTipCtrl m_ToolTip;
m_ToolTip.Create(this, TTS_ALWAYSTIP);
m_pToolTip.AddTool(...)
m_ToolTip.SetToolInfo(&ToolInfo);
and in PreTranslateMsg
m_ToolTip.RelayEvent(pMsg);
Create and Addtool does not return failure msg and it does not throw any error but still there is no display. Can anyone pls help me out
with this?
meenu
|
|
|
|
|
Creating and displaying tooltips is really a hard job.
Anyway try this link:
http://www.codeproject.com/miscctrl/tooltipex.asp
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
|
|
|
|
|
Hi,
Thanx a lot for ur response. But as I told u, I tried it out as mentioned in the link only...But still, There is no tooltip display. Can u figure out what could be the problem.
With thanx,
Meena
|
|
|
|
|
Is it a dialog/view based app ??
Can u give little bit more insight into the scenario ??
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
|
|
|
|
|
dear all,
how can i terminate my dlg based mfc app gracefully from a 1) cdialog based class and 2) from the main application class
currently i'm using
AfxGetMainWnd()->DestroyWindow() in both the cases.........is this approach neat?
thnx
rIsHaBh
|
|
|
|
|
1. Call CDialog::OnOK() / CDialog::OnCancel() depending on the return value needed.
2. If you are using DoModal() method to show the dialog, then your main thread is already blocked, so it is just not possible to dismiss the dialog from main thread. If you ar using Create / ShowWindow( ... ) to show the dialog, then you can use DestroyWindow() on the dialog reference.
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
|
|
|
|
|
"If you are using DoModal() method to show the dialog, then your main thread is already blocked, so it is just not possible to dismiss the dialog from main thread."
but in this case how do i terminate my application...not just the dialog
rIsHaBh
|
|
|
|
|
You have to first close your dialog using OnCancel()/OnOK(). Then you can terminate your application from your main class.
void MyClass::OnSomeAction()
{
CMyDlg dlg;
dlg.DoModal();
//The thread is blocked at this point, and will resume only if the dialog is dismissed
//Terminate the application here.
}
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
|
|
|
|
|
dear all
can a single CDialog based class be associated with 2 dialog resources....
if yes how
regards
rIsHaBh
|
|
|
|
|
|
It can be done like this:
pDialog = new CMyDialog();
//Check if new succeeded and we got a valid pointer to a dialog object
if(pDialog != NULL)
{
BOOL ret = pDialog->Create(IDD_MYDIALOG,this);
//Change IDD_MYDIALOG with another resource ID
if(!ret) //Create failed.
AfxMessageBox("Error creating Dialog");
pDialog->ShowWindow(SW_SHOW);
}
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
|
|
|
|
|
Dear all
CString aStr="Learning 中文"; //a mixed English and Chinese string
Without using Unicode, How can i extract the Chinese Character word by word from a Mixed English and Chinese string?
Thanks
|
|
|
|