Can someone tell me if I have got this schem correct for usin Mutexs for controlling access to shared data (memory mapped) between two programs.
Each program creates the Mutex as follows:-
m_hMutex = ::CreateMutex(NULL,FALSE,"CSLSharedMemLock");
Each program uses the following procedure before...
I have an MFC application which create a thread to receive data from another application.
Now the thread is started and passed the pointer (this) of the main MFC application in order for it to access the methods/properties of the main MFC application that require updating.
This causes an...
Yes, what should be in the routine OnVScroll() and how do I call it, I dont know the 3rd parameter 'Scrollctrl of the Rich Text Control'
Everything works OK if I use the mouse to move the Scrollbar, but I still have to do this, help!
I have used the following:-
SCROLLINFO scrollInfo;
CRicd_output m_Output; // Rick Text Control
m_Output.GetScrollInfo(SB_VERT, &scrollInfo, SIF_ALL);
scrollInfo.nPos = scrollInfo.nMax;
m_Output.SetScrollPos (SB_VERT, scrollInfo.nPos, TRUE);
UpdateData(); // Refresh the control
But how do I...
Hi EMKH, sorry for the delay, but some code for you, its MFC C++
// MSCPPDlg.cpp : implementation file
//
#include "stdafx.h"
#include "MSCPP.h"
#include "MSCPPDlg.h"
#include <MMSYSTEM.H>
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
//...
Simple question how do you always have the text being written to this control visible; i.e. the data added onto the text is always show; i.e. the scroll bars always being move to the botton for new data.
e.g.
Data crlf
New data crfl etc
etc
The text grows.
If you load a library dynamically via the LoadLibrary("MyLib.DLL"); are they any facilities to see what the library is doing; i.e. number of thread running in it, stuck in a loop etc.
What is the maximum size of string you can place in a Edit Box on a dialog. Note I am using CString for holding the text.
I am using a multiline Edit Box to display the progress of a test activity. The display used to be a DOS Window.
I use the following code to update the output:-...
Got it sorted with the following code sample:-
http://www.codeproject.com/threads/csharedstruct.asp
Using Memory mapped shared data structures.
WIll always use this for applications on a single PC.
Dont think thats a solution.
The DLL needs to be the server and use CreateMailslot to create the Mailslot. But how do you start this running (i.e. to check the Mailslot for messages). Dont have an Entrypoint for the DLL.
To recap all I want is the ability to share 3 integer value between the...
Tried it, it only works for instances of the same application. Not for two differently named applications.
Do I need to use Mailslots or memory mapped files just to share this small amount of data.
I am trying to have an MFC application that shares data with a DLL.
The DLL is loaded via a batch file in a C-Scripting environment.
I have included the following lines of code in both the EXE and DLL
#pragma data_seg(".CSL_DATA")
int volatile abortFlag = 0; /* The flag to abort the test...
I got it built but hit another problem!
The abortFlag is always 0 (false); see code snips below:-
First the Modifed section of th DLL project:-
#define DLLDIR __declspec(dllexport) // export DLL information
// The extern "C" declaration allows mixed languages compactability, it prevents
//...
I need to modify a library that is used by a C-Scripting application to allow a MFC application to stop and start the processing.
However I get the compiler error C2059 at the code snip below:-
#define DLLDIR __declspec(dllexport) // export DLL information
// The extern "C" declaration...
I have been trying to build my first DLL but keep getting the following error and have no idea what it means. The Help not very useful either.
TEST_DLL fatal error LNK1104: cannot open file 'c:\Program.obj'
I do not use the file Program.obj and it does not even exist.
I have been trying to use my DLL but keep getting the error no 'initialize' entry found in WHL_TEST_DLL.DLL
It's the 1st time I have tried to do a DLL in Visual Studio.
See code below:-
// WHL_TEST_DLL.cpp : Defines the entry point for the DLL application.
//
#include "stdafx.h"
#include...
I am thinking of developing a application with a joystick as an input device via the USB port.
Does anyone have any code to smooth out the action.
Currently would like roll and pitch smoothed to -/+ 180 from the 0 to 65756 values used by the joystick.
i.e. dip a few desgrees/sec while...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.