|
There is a registry key called 'App Paths' in the registry.
HKEY_LOCAL_MACHINE\Software\Microsoft\Widnows\CurrentVersion\App Paths
For each EXE you specify, you can also specify additional folders' that the application will use to search for a DLL.
So, put all your DLL into one folder, and create an app paths entry for each of your special EXE files.
Good luck!
|
|
|
|
|
thx for this trip
works fine for simple exe but
infortunatly , i have services NT too who try acces this dll.
not work for services , any idea?
thx
|
|
|
|
|
What if you try
BOOL SetCurrentDirectory(LPCTSTR lpPathName);
to the location where the DLL are before loading the DLL?
If that does not work, I think you have a set of constraints that can not be satisfied.
Also, if you control ALL of the DLL loading and codes, you can always use explicit full file paths in all calls to LoadLibrary, instead of using only the file name.
|
|
|
|
|
Do not use MFC, or link the MFC Dlls staticly in your project.
Enjoy it.
Rodrigo Pinho Pereira de Souza
|
|
|
|
|
Am I correct in assuming that you can fire 2 timer processes, possible concurrently, in an application. One timer process may be running and waiting for a flag to be set in another timer process.
Thanks,
Jerry
|
|
|
|
|
If you mean timer threads, then yes
|
|
|
|
|
I am only using 2 SetTimer() functions. How do you set up timer threads??
Jerry
|
|
|
|
|
jerry1211a wrote:
How do you set up timer threads??
Calling SetTimer() within a thread.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Real concurrency is only possible on multi-processor hardware. Otherwise you have the appearance of concurrency by the OS switching thread context.
The only way to acquire concurrency or even simulated concurrency is with multiple threads. If your process only has a single thread then your code executes synchronously. You can have two timers but only one at a time will execute.
For win2k and above OS you can use the CreateTimerQueueTimer() APIs which handle worker thread creation for you. Otherwise for older OS's you will have to generate your own threads.
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
Thanks...have a good day.
Jerry
|
|
|
|
|
you don't have to use thread if you feel it's not needed.
you can use 2 SetTimer (). the code you have to add to make the difference btween the 2 is into the OnTimer(UINT nIDEvent) function.
just test nIDEvent . if it matches the ID of your 1st timer, then the 1st timer times out, otherwise, it is the 2nd.
and you can set like that as many timers as you want... (growing up subsequently you OnTimer() function)
TOXCCT >>> GEII power
|
|
|
|
|
I have copied SDI app project from one computer to another. Visual studio on the first is installed on d: partition, so when I try to build app on second I get this error:
MySDIApp.hpj<br />
HC5011: Error: MySDIApp.hpj : <br />
Cannot open the file "d:\Microsoft Visual Studio\VC98\MFC\include \afxhelp.hm."
Which setting should I change to fix this problem?
|
|
|
|
|
There may be other ways but i have always edited the .hpj file.
pete
|
|
|
|
|
Thanks for help "on help";). I couldn't find hpj file on the second computer, but I found it in the folder I copied the project from and edited it.
|
|
|
|
|
Hi,
I have created a SQL SERVER ODBC DSN (data source name) with an authentication using Login ID and Password.
I would like to use my DSN without specifing the Login ID and Password in my code: here it is my code:
SQLHENV henv = NULL;
SQLHDBC hdbc = NULL;
SQLHSTMT hstmt = NULL;
SQLRETURN sRet;
PTSTR szDataSource = _T("MyDSN");
PTSTR szUID = _T("LoginID");
PTSTR szPWD = _T("Password");
// Initialize the ODBC environment.
if (SQLAllocHandle(SQL_HANDLE_ENV, NULL, &henv) == SQL_ERROR)
{
WriteIntoFile("ERRORE Initialize the ODBC environment");
return false;
}
SQLSetEnvAttr(henv, SQL_ATTR_ODBC_VERSION, (void*) SQL_OV_ODBC3,SQL_IS_INTEGER);
// Allocate a connection handle and connect to the data source.
if (SQLAllocHandle(SQL_HANDLE_DBC, henv, &hdbc) == SQL_ERROR)
{
WriteIntoFile("ERRORE Allocate a connection handle");
return false;
}
if (SQLConnect(hdbc, (SQLTCHAR*) szDataSource, SQL_NTS,
(SQLTCHAR*) szUID, SQL_NTS, (SQLTCHAR*) szPWD, SQL_NTS) == SQL_ERROR)
{
WriteIntoFile("ERRORE Connect to the DataSource");
return false;
}
How can I do it?
|
|
|
|
|
How can I have tooltips when the cursor is over an item of my CListCtrl.
I have enabled ToolTips with CListCtrl::EnableToolTips() but it didn't works better ...
I've read something about CToolTipCtrl, but I don't know how to make relations between CListCtrl items & ToolTip's text of the CToolTipCtrl ....
--
Gizmo
|
|
|
|
|
|
it's ok, I create my own class from CListCtrl and I have used TTN_NEEDTEXTA & TTN_NEEDTEXTW event to do it ...
Tanks to Hans Dietrich and his XListCtrl source code ...
--
Gizmo
|
|
|
|
|
I have an app that prints a calibrated tape. I would like to print in mirror image. If I use
SetGraphicsMode(pDC->GetSafeHdc(), GM_ADVANCED); and then SetWorldTransform, I can get the mirror image, but when I print or do a print preview, the text is simple printed upside down!
I narrowed the offender to the SetGraphicsMode(pDC->GetSafeHdc(), GM_ADVANCED); call. Just adding SetGraphicsMode, without any other calls, results in the non-mirror image like you would expect, but the printouts give you upside down text. Has anyone ever worked around this?
TIA
Eric
www.compufoil.com
|
|
|
|
|
okay i'll describe my problem in a greater detail.I already have dialog box in which some of the controls are workin.Now want to add a property sheet/tab(I'm confused between both), so that all the previously added controls also remain place and the tabbed control gets inserted in the dialog.I tried to insert the tabbed control by dragging it from the control box.But i does get displayed.
I m unable to proceed further.
Hope i was able to explain.
Aarti Vimal
|
|
|
|
|
aarti vimal wrote:
I tried to insert the tabbed control by dragging it from the control box.But i does get displayed.
So are you wanting it to not be displayed instead?
The tab control is added to the dialog template just like any other (e.g., edit) control. You select the control from the Controls window and then click on the dialog template. Position/size the control as necessary at that point.
What are you seeing that does not behave in this fashion?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hello
i'm using a Treeview for a chat client. I've got a small problem.
I want to be able to select the item and open a menu with OnRightClick.
I've implemented the OnrightClick function, but first, i have to select the item with the left mouse button, and then do the right click.
I have to select the item first because i want to get the string of what's been selected. If i do right click over an item, the program crashes, because it doesn't know where to get the string
How could i do the two steps (left click, then right click) in only one, when i right click with the mouse?
thanks!
|
|
|
|
|
void C3StateTree::OnRButtonDown(UINT nFlags, CPoint point)
{
UINT uFlags = 0;
HTREEITEM hItem = HitTest(point, &uFlags);
if( uFlags & TVHT_ONITEM )
{
CString sText = GetItemText(hItem);
Arjan
|
|
|
|
|
|
hi evrybody
i"m trienig to change my cursor during the time the app runs - first of i load the cursor in the main func
wc.hCursor = LoadCursor( NULL, IDC_ARROW );
where wc is my window and than i want to open a dialogbox where i would change my cursor in
anyone can help on how to do it ???
thanx alot
|
|
|
|