|
|
Does anybody remember a graphics library shipped with older MS C compilers? Is there available something similar to that one, maybe in (open) source version?
|
|
|
|
|
Use Windows' own GDI[^] or GDI+[^] for graphics programming, it is so much simpler than any of the older libraries.
|
|
|
|
|
are you using an old DOS C compiler (MSC 5 or MSC 6, etc.) ?
if so, that's going to be tough...
|
|
|
|
|
Found [here]
Scroll down to [svgacc25.zip]
svgacc25.zip Size: 183,989 Date: 03-31-97
SVGA Gfx lib for MS compatible C/C++ compilers
|
|
|
|
|
Hi!
I'm calling an exe from a Batch file using CALL statement. The exe is not the same folder with batch file. The exe is inside some other folder.
The exe has some dependencies(VC++ DLL's). How to include/call those DLL's also inside the CALL statement so that my exe would run without errors?
The code that I use is:
<pre>
PushD .
Cd ..
Call Gen /AssetManager:Disable /DisplayErrors:off /ReturnErrorsCount:off /Log:Enable /Log:Html /Log:Verbose /Window:Normal /CreateObjectHash /RemoveSources:On /CreateResourceHash /GenerateDisplayLists:On /GenerateSceneLists:Off /GeneratePreDrawOT "france_1222\Test.xml" france_1222\%_SDF_% "iPhone"
PopD
</pre>
"Gen" is my exe name.
|
|
|
|
|
You don't need the CALL command to execute an executable program from within a batch file. The CALL command is provided to execute other batch files from within a batch file or call a local subfunction.
Each executable file tries itself to resolve DLL dependicies. If your application terminates due to missing DLLs, you must place the DLLs in common directories or modify the DLL search pathes.
Common DLL directories are:
- The directory from which the application loaded.
- The system directory.
- The Windows directory.
- The directories that are listed in the
PATH environment variable.
To add directories that are searched by your application you may use the API function SetDllDirectory() .
To add directories using a batch file, append them to the PATH environment variable.
|
|
|
|
|
hi i need to know to evaluate acpi methods that need input arguments. I need to use to ACPI_EVAL_INPUT_BUFFER_COMPLEX_EX for input buffer type and im not sure how to specify the arguments. I tried few things but the IoCallDriver returns Record length error. Pls help me with an example.
|
|
|
|
|
Hi,
I am trying to start 4 socket connections (same IP different socket) with each running in thier own threads
here is the class defination for the Derived CWinThread
class SockCLeintThread : public CWinThread {
public:
public:
SockCLeintThread(UINT myport);
~SockCLeintThread();
CWnd *sendwindow;
CWnd *call_wnd;
char *thread_id;
SockClient thisocket; virtual BOOL InitInstance(); void Sendit(WPARAM, LPARAM);
void Receiveit(WPARAM, LPARAM);
LPCTSTR ipaddr;
BOOL idle; allexceptions myallexception;
struct {
unsigned int is_connected : 1;
unsigned int busy : 1;
} flags;
protected:
DECLARE_MESSAGE_MAP()
};
Class defination for the derived CAsynSocket Class
class SockClient : public CAsyncSocket
{
public:
SockClient(UINT myport);
char *sockbuffer; int num_buff;
CWnd *send_wnd;
int thread_no;
UINT port;
private:
int busy; protected:
virtual void OnReceive(int nErrorCode);
virtual void OnSend(int nErrorCode);
virtual void OnConnect(int nErrorCode);
virtual void OnClose(int nErrorCode);
the custructor for the CwinThread takes a port #
I start these threads in My CwinApp::Initinstance
here is the loop
for (i = 0, start_port = 11007; i < 4; start_port++, i++)
{
threadptr[i] = new SockCLeintThread(start_port);
if (threadptr[i] == NULL)
m_pMainWnd->MessageBox("SockClientThreadFail",NULL,MB_ICONERROR);
threadptr[i]->CreateThread(CREATE_SUSPENDED,0,NULL);
threadptr[i]->flags.is_connected = 0;
threadptr[i]->ipaddr = "192.168.1.4";
SetThreadName(threadptr[i]->m_nThreadID,thread[i]);
threadptr[i]->ResumeThread();
}
Here is the constrocter of the dervived CwinThread
SockCLeintThread::SockCLeintThread(UINT myport) : thisocket(myport)
{
m_bAutoDelete = FALSE;
}
The Constructer for the derived CAsynSocket
SockClient::SockClient(UINT myport)
{
port = myport;
sockbuffer = new char[300];
}
in the CwinThread::initinstance is were is I create the socket and try to connect
OOL SockCLeintThread::InitInstance()
{
int error_code;
MSG m_msgCur;
extern void SetThreadName( DWORD dwThreadID, LPCSTR szThreadName);
if(thisocket.Create(thisocket.port,SOCK_STREAM,NULL)== 0)
{
error_code = GetLastError();
}
if (thisocket.AsyncSelect (FD_CONNECT|FD_CLOSE|FD_OOB|FD_ACCEPT) == 0)
error_code = GetLastError();
if( thisocket.Connect(ipaddr,thisocket.port) == 0)
{
error_code = GetLastError();
}
else
flags.is_connected = 1;
PeekMessage(&m_msgCur, NULL, NULL, NULL, PM_NOREMOVE);
return TRUE; }
I have step thru this code numerous times an have gotten exception st different points but mostly at the CAsynSocket::Create
If I am not going about this right way please let me know
|
|
|
|
|
ForNow wrote: I have step thru this code numerous times an have gotten exception st different points but mostly at the CAsynSocket::Create
You need to show the exact details of the exceptions you receive and include the values of any parameters involved at the time of the exception.
|
|
|
|
|
You are right however debugging multithreading code is really fustrating
1) When I run my code normally (just single stepping) the first of my 4 threads executes
correctly
gets created
gets connected
2) the other thread dont dont means get connected
a couple of other observations
When I set a breakpoint at with a filter to the second thread at the following location
"CAsynSock::Connect" the breakpoint takes and I get a connection for the second thread
71: if( thisocket.Connect(ipaddr,thisocket.port) == 0)
00A64637 mov ecx,dword ptr [esi+68h]
00A6463A mov edx,dword ptr [esi+70h]
00A6463D push ecx
00A6463E push edx
00A6463F mov ecx,edi
00A64641 call CAsyncSocket::Connect (0A65364h) <==== Breakpoint set here
00A64646 test eax,eax
00A64648 jne SockCLeintThread::InitInstance+4Eh (0A6464Eh) 72: {
When I select thread 3 or 4 from thread dialog box and right click and select "Switch to thread" there is a little green arrow pointing to the "test" instruction right after the call to "CAsynSocket::connect" and the register valued are grayed out
it would seem to me that the call to CAsynSocket::connect has to be serialized
per thread
|
|
|
|
|
ForNow wrote: debugging multithreading code is really fustrating Very true, that's why it is best not to use multi-threading until your code is working.
ForNow wrote: it would seem to me that the call to CAsynSocket::connect has to be serialized
per thread Checking the documentation and your implementation will help you determine if that's true.
|
|
|
|
|
Can someone explain the usage of the run time macros DECLARE/IMPLEMENT_SERIAL
DECLARE/IMPLMENT DYNAMIC DECLARE/IMPLEMENT/DYNCREATE
Thanks
|
|
|
|
|
|
ForNow wrote: explain the usage of the run time macros ... It is all explained here on MSDN[^], which you should learn to use more often.
|
|
|
|
|
I have a Delphi application which Creates a shared memory uses CreateFileMapping, OpenFileMapping, MapViewOfFile functions.
Now I wanted to share the same memory for my MFC application. I used the OpenFileMapping, MapViewOfFile functions.
I created a structure exactly same in size as the Delphi application and mapped the structure object.
sample code:
HANDLE hMapObject2;
hMapObject2 = OpenFileMapping( FILE_MAP_ALL_ACCESS, FALSE, "PP101U3_SHARED");
if( !hMapObject2 )
{
AfxMessageBox("Failed to open Simpack DataBase");
return( 0 );
}
Simpack = ( struct SIMPACKDB *) MapViewOfFile( hMapObject2, FILE_MAP_ALL_ACCESS, 0, 0, 0 );
if( !Simpack )
{
AfxMessageBox("Failed to create Simpack File Map View");
return(0);
}
Esim->SPV1 = Simpack->SP_Z;I am able to read the values exactly correct for all the member variables in the structure.
But when I try to write value in the shared memory, its not changing. It shows the previous value immediately in the debugger watch window.
The value of Simpack->SP_Z[15] is 0.5010 as read from the shared memory which is got from the Delphi application. i.e., value set by the Delphi application
When I set or write the value of the same variable to the shared memory in my MFC Application using the code:
Simpack->SP_Z[15] = 0.6123;
or
float test = 0.6123;
memcpy( Simpack->SP_Z + 16, &test, sizeof(float));it still shows the previous value 0.5010 which is got from the Delphi Application. But When I change the same variable's value in the Delphi applicationit changes and the changed value can be read here in the MFC application.
Please help me to find why I am unable to write or set value in the shared memory from my MFC Application and suggest me with any code how to write the values in the shared memory from my MFC Application.
Is there anything wrong in the code?
Is this happening because I am sharing the memory that is created by a Delphi Application from a MFC Application? i.e., Sharing memory between Delphi and MFC Application is not allowed.
|
|
|
|
|
You still haven't figured this out?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
No I am unable to find out. The Problem is still persisting
|
|
|
|
|
Hi,
As a part of our project's analytical phase, I am doing a research on the methods of putting some software pieces together in a unified user interface. We are a software company having some standalone software selling to the customers. But we decided to rewrite them using Qt and provide customers a all-in-one application suite (like Folder Lock product) and offer them their requested software and features.
There are a variety of methods to do the UI integration such as using COM technology, using plugin frameworks, using simple multi-exe launcher and using component/library compositors.
Does anybody know a guide or survey (not a university-like paper or article) around the currently available software integration techniques with the focus on 'user interface'? The thing I really seek for in this guide is an introduction about each method and then an overall comparison for those methods, their pros and cons. The information would then be used to decide about the technique we adopt in our company.
Thanks for your help
|
|
|
|
|
I'm not certain what the question is or what is the expected goal?
What is "softwre integration" when talking about user interface? is this like having the same UI look and feel across different application from the same "company" (i.e. software suite) ?
If that is the case, just create a simple UI library (or DLL) that will handle all the UI classes and use that library for your different projects.
Aren't you over-complexifying your project?
Or am i missing something ?
Watched code never compiles.
|
|
|
|
|
As I said in the question, we seek for a solution to provide our customers an application suite, but depending on the license or product class (Home edition, enterprise edition, etc) we deliver suites with different capabilities. For example, suppose our suite is a security suite. In home edition we have just file encryption and in Enterprise edition we have both file and disk encryption features.
The magic we look for is a proven method for our developers team to simply define the class type and then build the intended suite. If you, as the customer, later bought a higher class license, you will receive a small package of components which could be easily installed on your system. Launching the original product suite, you will have the new features available in it without having to modify the older installation. This way we have a dynamically configurable component suite with a unified look and feel for the component UI elements.
If you have guide or survey (though not detailed) please send it out to me.
|
|
|
|
|
I don't have a guide or survey; me think it is all done on a case-by-case basis with requirements and specifications specific for each company that does that.
One way of doing it would be to split your project in different sub-projects:
- UI Library: responsible of creating the UI look and feel (this could be optional if you use the default Microsoft UI look and feel and User Experience guideline)
- application launcher : main difficulty is here.
The launcher will be responsible to find all installed components and present them to the user according to the license in place (for example, it could look for executable and extract icons for them, and present them to the user as buttons to click to launch corresponding application.
- discreet applications (file encryption, disk encryption, ... ) : Individual components that could be build and run and tested independently.
Good luck with you projects.
Watched code never compiles.
|
|
|
|
|
Hi friends,
I have started to explore about abstract class and interface. but i could not able find exact solution for my question.
1. when where and how to use abstract class and interface in real time application using C++.
2. What is difference between Abstract class and Interface class?
kindly share your views and idea with me.
Thanks and Regards,
S.Shanmugaraja
|
|
|
|
|
shanmugarajaa wrote: 1. when where and how to use abstract class and interface in real time
application using C++.
Abstract Class: Abstract class provides default behavior for a function. This means, that even if child class does not provide its own method, we have a default behavior for this method. Eg: The classes like CEdit, CButton etc.
Interface: You cannot provide a default behavior in interfaces. Interfaces only allow you to provide signature of the method.
shanmugarajaa wrote: 2. What is difference between Abstract class and Interface class?
You cannot provide access modifiers methods in Interfaces, but access modifiers can be specified in a abstract class.
You talk about Being HUMAN. I have it in my name
AnsHUMAN
|
|
|
|
|
1. Abstract classes and Interfaces are basic building blocks of the language, they have nothing to do with real-time or any other type of application, in the sense you are asking about.
2. See this discussion[^] from Microsoft.
|
|
|
|