|
Named kernel objects are sharable across processes.
|
|
|
|
|
I have used named kernel objects. Also I have tried to set the security attribute with following code
SECURITY_ATTRIBUTES secAttr;
char secDesc[ SECURITY_DESCRIPTOR_MIN_LENGTH ];
secAttr.nLength = sizeof(secAttr);
secAttr.bInheritHandle = FALSE;
secAttr.lpSecurityDescriptor = &secDesc;
::InitializeSecurityDescriptor (secAttr.lpSecurityDescriptor, SECURITY_DESCRIPTOR_REVISION);
::SetSecurityDescriptorDacl(secAttr.lpSecurityDescriptor, TRUE, 0, FALSE);
HANDLE hEvent = ::CreateEvent( &secAttr, TRUE, FALSE, L"Global\\MyEvent");
Still facing the same problem : openEvent fails to open this event
|
|
|
|
|
Did you do what Superman told you to? What is the result?
|
|
|
|
|
Result : OpenEvent in my RTOS fails , handle return is NULL , GetLastError Return 2 which is File NOT Found error as per WinError.h
|
|
|
|
|
I am sorry, I can't help you any further. The RTOS docs are your best friends. Also, consult other people who use the same RTOS.
|
|
|
|
|
Thanks a lot ..I will try to get some breakthrough from the docs..
|
|
|
|
|
i have 100 or 1000 lines of string. That may contain UNICODE character or ANSI .. i want to write all that strings into UTF-8 format.can you help me?
|
|
|
|
|
The following link might be interesting, for you:
_open, _wopen[^] at MSDN (showing you may open a file in UTF-8 or UTF-16 mode).
UTF Helpers[^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
How do i convert PRtime Format to readable form?...please any one can give logic.
|
|
|
|
|
Try find it in code guru.... i think you ll get it from there....
|
|
|
|
|
I suppose you may directly store (PRtime/1000) into a __time64_t variable and then use CRT time formatting functions, like asctime , ...
See "time, _time32, _time64"[^] on MSDN .
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I am fresher just before 1 month i joined a IT company. Here i am working on VC++. I want to load two different XML files in VSFlexGrid_1 and VSFlexGrid_2 respectivelly and i need to compare the both xml files. If any mismatch found in the both files it should display in red color and if element not found in any one of xml file it should leave one blank line. I hope you know how the Beyond compare application works. like same my application should work. please help me to code for it.
Thanks & Regards
Savita
|
|
|
|
|
Click hete ->MSDN Search[^]
I believe in LOVE AT FIRST SITE...
Bcoz I have loved my Mother...
even since I opened my eyes...(ICAN)
|
|
|
|
|
XML files are just text - any diff comparer should do what you want - don't bother re-inventing the wheel.
|
|
|
|
|
As one of the poster already said don;t re-invent the wheel. but you can take a peek into WinMergeU its open source, it sure time consuming.
-Regards
A
|
|
|
|
|
Please use winmerge software to comapre to xml or text file.whichever you want.
if you want with VC++.
please use MSXML sdk or read MSDN.
don't try copy paste.
that's bad habbit to fresser.
|
|
|
|
|
hello guys... i have got this static library "myLib".
Now in this library, classes are declared but their respective definitions are separate files (with the names of classes). There is also "stdafx.h" file inwhich necessary files are already included.
This library builds successfully but the problem comes, when I include this library's "*.h" file into my client project. Im getting annoyed by these errors. Some of them are as follows
- error C2504: 'CObject' : base class undefined ...
- error C4430: missing type specifier - int assumed. ...
- error C2143: syntax error : missing ';' before 'protected'
- error C2146: syntax error : missing ';' before identifier 'm_evtComplete'
Im getting no less than 159 errors. But as stated earlier, thid library builds successfully. Any ideas??
|
|
|
|
|
Looks like you do not have #include <afxwin.h> in the stdafx.h.
You would also need to set Use MFC in a Shared DLL in Project -> Properties -> Configuration Properties -> General -> Use of MFC .
|
|
|
|
|
I was facing the same problem. error C2143: syntax error : missing ';' before 'variable'.
DEFINE_TYPE variable;
and it solve when i include the header file where DEFINE_TYPE is declared.
what is the type of m_evtComplete??
May be this will solve your problem.
I believe in LOVE AT FIRST SITE...
Bcoz I have loved my Mother...
even since I opened my eyes...(ICAN)
|
|
|
|
|
Hi
I am creating an Event in my windows application (.exe) I am trying to open this event in my RTOS application. The method provided by RTOS API is
::RtOpenEventA(EVENT_ALL_ACCESS ,false, "MyEvent");
This method fails to open event in RTOS application. Events are the kernel object, there will be some way by we can access these events in other application . Can you provide some breakthrough.
Thanks
|
|
|
|
|
Named events can be accessed across applications.
You should check the return value of the RTOS API and check what the error is.
I'm guessing it is a permission issue.
If you've not used named events before, I recommend you first try this using 2 Windows applications.
|
|
|
|
|
From what I understand about RTX, the RTX specific functions are similar to, but do not overlap the Win32 functionality. However, I believe you can still call the Win32 functions from withing your RTX specific program. In this case, you'd have to call OpenEvent().
|
|
|
|
|
First I want to say that I am 100 pages into Beginning Visual C++, so I have basically no exp. All of my programming has been VB, C# and if you are over on the PHP side you'll notice I'm starting that and not very good yet
Anyways, this is the problem we have where I work. We are moving from Visual Studio 6 to 2010 (slight jump) and are running into some problems with speed. For example I can write a app in VB to read from a database and put the data into a DataSet in about .4 seconds. To do a similar operation in C++ is taking 5 seconds (not .5 but 5).
VB Code is as follows to fill the dataset
sqlString = "SELECT * FROM attyesqs"
da = New SqlDataAdapter(sqlString, objConnection.cnn)
da.Fill(ds, "Debts")
If you know VB we are talking very simple and it works well.
However our other programmer who is trying to get similar performance out of a MFC app is running into the problem of it being 4.5 seconds slower. He is using a DSN and ODBC
not being familiar enough with C++ I don't know what part to post here, but the connection he is using is as follows:
CDatabase cd;
CRecordset sourcers(&cd);
CString DSNString = _T("DSN=dsnName;UID=user;PWD=password;"), SQLString = _T("SELECT AttyLastName, AttyFirstName FROM ATTYESQS");
I'm actually grabbing more columns in my query but that shouldn't matter much, I think it's only like 2 or 3 more. With VB and C# things have changed greatly in the last 10 years, is there now a better way to do this in C++/MFC? I can try to answer any questions you may have, and as always thank you in advance!
|
|
|
|
|
ADO .NET is fairly easy, although Visual Studio stops supporting Intellisense for C++/CLI with Visual Studio 2010.
LINQ is another option, but it's even more overhead since it's based on ADO .NET.
|
|
|
|
|
If I remember right the SQLConnection I'm using in VB is basically ADO? I've been doing some reading and from what I've been finding people are saying that DSNs are "now slower than dirt", is this the case or just a case of them not being used properly? If they dropped intellisense support for ADO am I to believe that this is something that is going to be gone in the near future and replaced with something else? Again new to this side of things so excuse my lack of knowledge. Thanks again.
|
|
|
|