|
It will mostly depend on what the contents of the input file are and the required output is. It would be good if you could provide an example of both files.
Thanks and Regards,
Zuber
|
|
|
|
|
HI,
I had given one example of how the input file will be, and how i have to gather the information from the given file.
The input file contains the information in the following format,
#10
1 SN1
0 SN2
#15
0 SN3
x SN1
1 SN2
#50
0 SN5
0 SN1
In the above given format,
#10, #15, #50 are timestamps
SN1, SN2, SN3, SN5 are signal names
0, 1, x, are logical values
From the above example, i have to gather information like SN1 is changing at #10, #15, and #50. and the logical values are 1, x, 0. Likewise, have to gather all the information of each and every signal. From the gathered information, in future, if i refer one signal name, i could be able to retrieve all the relevant information (i.e., timestamps, and logical values) of that corresponding signal name. So i need all the information for future reference. So suggest me the best way to store the information.
Gathered information from above example,
SN1 10 15 50
1 x 0
SN2 10 15
0 1
SN3 15
0
SN5 50
0
With Regards,
Sangeetha.
|
|
|
|
|
I want to put the image in memory onto the screen in an appropriate size.
Found that a coordinate transformation made a fuzzy image.
In OnSize, the size tranformation will occured frequently. It needs a better performance.
Another solution is always prepare the Image object in memory as large as what will be drawn onto the screen. It also has a problem, when size of the client changed frequently, the memory Image should be redrawn frequently.
How to make the representation of the image clear and the performance good.
Thanks.
modified on Tuesday, December 25, 2007 1:58:37 AM
|
|
|
|
|
Hello All,
I want to Deploy my MFC Activex Control by Web browser. So what are the DLLs that i need to include in my package?
Thanks in advance.
Manish Patel.
B.E. - Information Technology.
|
|
|
|
|
Check with Dependency Walker
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Thanks for reply.
But i want to know what are the basic DLLs that we need to run MFC Activex Control(Not coded for any application, only just control).
Manish Patel.
B.E. - Information Technology.
|
|
|
|
|
do you mean the mfc dll's. if so dependency walker will help you get the details or do you mean, that there are 3rd party dll's that you are calling in your code.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I want to save a 24 bit bitmap's RGB data as a file.I firstly import it to resource editor.
void CReadView::OnDraw(CDC* pDC)
{
CReadDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
int i,j;
int counter=0;
BYTE data[640*480*3];
CBitmap bmp;
bmp.LoadBitmap(IDB_BITMAP1);
bmp.GetBitmapBits(640*480*3,data);
BITMAP bitmap;
bmp.GetBitmap(&bitmap);
for(i=0;i<bitmap.bmHeight;i++)
for(j=0;j<bitmap.bmWidth;j++)
{
pDC->SetPixel(j,i, RGB(data[counter],data[counter+1],data[counter+2]));
counter+=3;
}
}
The result is not correct.
|
|
|
|
|
|
Hi,
I am a little confused as to the sequence of events that occur when Thread is Created and The TLS API('S) are called
First CreateThread APi is called the if any DLL's are loaded
BEFORE the Function in the CreateThread API get control the DLL_THREAD_ATTACH message is sent
Now if Want to know What the parms are in CreateThread API
Can I use the TlsAlloc function and TLSSetValue fuction in the Process/thread
So when DLL get control it would know what parms or information are on the CreaThread API By Doing A TLSGetValue function ???
|
|
|
|
|
You could do that - but you don't really need to.
You use the TLS API for "global" variables, that need one instance for each thread - e.g. the variable that stores the value for GetLastError(). Typically, a library allocates a block of memory for all these thread-separate variables.
You could store the parameters in global variables - you would need TLS only if different threads concurrently create new threads.
My question, of course, is different:
Why do you need the information in your DLL, and what are you trying to accomplish?
|
|
|
|
|
I modifying a C MSVC makefile solution I added my own project to this solution which has only 1 project a C makefile project
Whereas my Project is a C++ MFC project
Most of the code for this proect is in 3 Classes The First one
has only one instance where as the others have multiple instances
IS it possible to store the Address of the Object Via NEW in the TLSSetValue ??? for the Class?object which has multiple instances
This would give me a Way of connecting the Thread with the DLL
|
|
|
|
|
Yes, ypou can. In fact, you don't even need to handle the DLL_THREAD_ATTACH notification:
static int slot = TlsAlloc();
CMyState * GetThreadState()
{
INT_PTR value = TlsGetValue(slot);
if (value == 0)
{
CMyState * state = new CMyState();
TlsSetValue(slot, (INT_PTR) state);
return state;
}
return (CMyState *) value;
}
Note that this sample omits all error handling. Especially in (1) TLS slots may already be exhausted, in which case you need to fail gracefully. TLS slots are a very limited resource, so you should use one and only one and only when you really need it. So you'd better design an extensible data structure for your use (rule: play nice wiht others). Also, (2) may throw or return a NULL depending on your memory error handlign settings.
You must, however, handle DLL_THREAD_DETACH (or another "thread is terminating" mechanism) to free the objects you created.
|
|
|
|
|
One more important thing I need to know When Executing CreateThread
What gets Control First The thread stating procedure
or
DLL_ATTACH_THREAD
Thankx
|
|
|
|
|
In answer to this question before, I was advised to look at http://msdn2.microsoft.com/en-us/library/8kche8ah.aspx, which is titled "Determining Which DLLs to Redistribute". It lists these nine DLL's: atl90.dll (Active Template Library); msvcm90.dll msvcp90.dll msvcr90.dll (C Runtime and Standard C++ Libraries); mfc90.dll mfc90u.dll mfcm90.dll mfcm90u.dll mfcmifc90.dll (Microsoft Foundation Classes). But of these nine I can only find msvcm90.dll msvcp90.dll msvcr90.dll anywhere in my folder tree c:\Program Files\ .
The page http://msdn2.microsoft.com/en-us/library/8kche8ah.aspx has at top right corner a window saying "This page is specific to Microsoft Visual Studio 2008/.NET Framework 3.5"; but that page's text also says "As you use DUMPBIN or depends.exe to view your dependencies, use the file list in Redist.txt to see which of the DLLs that your application depends on are Microsoft-supplied DLLs that are part of Visual Studio. Redist.txt is located in the Program Files\Microsoft Visual Studio 2005 directory on the second Visual Studio 2005 product CD or on the DVD.". There seems to be a contradiction here. Please where can I find accurate information?
I tried using a dependency checker, but it listed dozens of .DLL's as needed; presumably most are in Windows and therefore in everybody's computers, and it would be like finding a needle in a haystack sorting through that lot.
I could presumably run the compiled program on another computer to see which DLL's the program needs; but buying a second computer for such a purpose is expen$$$ive.
modified on Monday, December 24, 2007 5:33:11 PM
|
|
|
|
|
Anthony Appleyard wrote: I could presumably run the compiled program on another computer to see which DLL's the program needs; but buying a second
Yeah Probably $ 75.00. You're looking for a Low Spec Machine in order to encounter those problems, so buy a cheap one. If it's too slow to be usefull, does not realy matter. All you want to know is, Does it work at all, and are all required System/MFC DLL's present!
I am familiar with the problem, and have always taken the following approach:-
- My code does not depend on bespoke applications (e.g MS Word etc) to work.
- I work on the lowest level platform that my app is supposed to be supported by. For instance, a current app I am developing is supposed to run on anything from Windows 98 upwards. As a consequence I develop it on a Win98 O/S. Upward compatibility is generally never a problem. i.e. what I write will run under Windows XP
- Where extensions are needed, e.g. In my Current case Named Pipes (Not supported under Win98) I first try to find out from Microsoft what redistributables are available to implement a feature. At least that gives me a List to keep note of, and you know what to include in your package.
On most occasions however, this line runs into the sand. In that case I write my own extension DLL which I own the copyright to, and can freely distribute. This extension DLL is carefully designed to provide the same functionality as the API I want to emulate.
Taking this approach, I found that code generally works without fretting about which System DLL's to distribute with it.
I feel that this problem most often occurs where a developer develops code on a top of the range machine, and sells to customers whith machines not quite so good.
Motto: Make sure you develop on the lowest spec machine that you expect to be supported, and you discover the problems at development stage rather than at the customer support stage. And, believe me, most DLL Distribution questions and problems will either not occur at all, or, if they do you will face them piecemeal during development.
Hope this is helpful
Bram van Kampen
|
|
|
|
|
You should need just 3 of those DLLs - one from each section,
depending on how your project is built...Unicode/non-Unicode,
multithread/single thread.
The easiest solution is to use the redistributable installer
that comes with the VS version you're using.
If you want to just ship the DLLs your app needs, follow the links at that
page you linked to and study carefully.
Those DLLs you need are NOT in the program files folder. They are installed
as side-by-side assemblies in the Windows/winsxs folder. You'll want to
understand how that side-by-side stuff works and how your app's manifest
helps with the DLL versions at runtime.
Have fun
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Of my current 3 Visual C++ 2008 (free download version) projects, I just now ran one in debug mode, and after I exited the program, Visual C++ listed in its debug output window a list of DLL loadings and unloadings, but all in C:\Windows\ and mostly in C:\Windows\System32\ ; three of them were
'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.6000.16386_none_87e0cb09378714f1\comctl32.dll'
'C:\Windows\winsxs\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.21022.8_none_96748342450f6aa2\msvcr90d.dll'
'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.6000.16386_none_5d07289e07e1d100\comctl32.dll'
Can I take this as meaning that my program does not need supplied .DLL's to run? Or what?
Would my program run on someone's computer that has Windows 2000 or Windows XL, or does it need Windows Vista?
Would it work if I merely put the required DLL's in the same folder along with the program's .EXE file? Or what would have to be done?
|
|
|
|
|
Hi there,
Please, can anybody give me a hint how to get DNS adresses from local pc(primary and secondary DNS) in the c++?
I have been searching at google, this web but nothing.
I use WMI in the C#.
Thanx a lot.
|
|
|
|
|
Can anybody help me to programm a chart which ist schown in a dxf file ?
|
|
|
|
|
Hi,
I need to create application which should read the .dwg file and display it onto a window. Please help me. I am a newbie for VC++
jakuar
|
|
|
|
|
|
Hi,
I have a Top Level MDI windows application. From the main frame users can choose a game. The game should open in a new frame window. This frame window should have a different view each time - according the game the user has selected.
How do i intervene with the creation of the views of the frame windows?
I have only one MainFrm class and one CView-derived class, which is enough. All i have to do is tell the view to draw a different backgournd each time (according to the selected game).
Thanks a lot in advance guys.
Snir_ya.
|
|
|
|
|
The selection can be saved in the doc class object, right?
|
|
|
|
|
|