|
Dear all..
I want to create a lab view which can be run on mini2440.
For the Lab view Application i want to use dll. which includes some basic functions.
so which programming language i have to use to create dll.
please help ..
thank you ...
sunil
-- modified 4-Dec-12 10:18am.
|
|
|
|
|
What exactly are you trying to create here, and why do you think you need a DLL before you have even decided what language to code in? And what Operating System will be running on the mini2440 (whatever that may be)?
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Dear sir,
I created a Dll in VC++ and it worked on lab view Appliation,
but when i try to use this same Dll in Lab View Application for mini2440,
i am getting Error..
Please help me,,
How to create dll for mini2440.?
thank you
sunil
|
|
|
|
|
sunil880089 wrote: and it worked on lab view Appliation Waht is a lab View application?
sunil880089 wrote: this same Dll in Lab View Application for mini2440 What is mini2440?
sunil880089 wrote: i am getting Error. Well we cannot guess what that error may be, you will have to tell us.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
I have a pretty large and old application where the user can select the current customer from a combobox. However, the number of customers have grown (>100) to the point where the users think that selecting a customer from the list is awkward.
Does anyone have a good suggestion for a replacement for a CComboBox? The droplist portion should be a multilevel menu or a tree or similar ... I have seen several attempts here and in other places, but they all seem pretty experimental (non-standard UI behaviour, hardcoded drawing functions not utlizing themes, and so on).
|
|
|
|
|
You could use the same idea that a lot of websites use, in that they build their lists dynamically as the user types into them. So if the user starts typing a you just load all the customer names from that sub group. Here are some CodeProject articles[^] that discuss the issue.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Thanks for the input, using some kind of incremental search could be an option.
However, my query was for a custom control with similar functionality as a CComboBox, but where the list box (the dropdown part) is replaced with a tree control or a menu with submenus. There's several examples here at codeproject, but I don't find any of them really cut for the job. It seemed like a pretty common problem, so there should definitely be someone out there having solved it.
|
|
|
|
|
Mattias G wrote: there should definitely be someone out there having solved it. Well I guess not since you can't find a sample.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
If you could find a ComboBox that expands into CListCtrl, then you can use the grouping feature of the CListCtrl.
But an easier solution is just to use two ComboBoxes. One that allows one to select user type, and one that displays the filtered result within the selected user type.
|
|
|
|
|
Hi
I have a function
void TakeData(myStruct &structRef)
{
CString str = TmpFileMgr->TmpFilePathName() ;
structRef.cstrFilePath = str ;
}
in a dll which takes Temporary folder path and assign it in a CString variables. This CString variable is member of structure object which is passed as a reference to TakeData(myStruct &structRef)function.
I am able to print temporary folder path in TakeData function and CString assigment works perfectly on Windows XP. But when I run this code on Windows 7 it crashes at the point where I am doing assigment of temp folder path in a CString variable. I have all admin rights on Windows 7 System , also I have put UAC to OFF.
Please provide any input in this regard. Thanks
modified 3-Dec-12 10:16am.
|
|
|
|
|
pandit84 wrote: But when I run this code on Windows 7 it crashes at the point where I am doing assigment of temp folder path in a CString variable. And yet this is the code you do not show. If TakeData() is not pages long, please post it.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
|
What is the definition of myStruct , and what is the value of structRef when the crash occurs?
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Struct is defined as below. Before crash ,value of cstrFilePath is empty.
struct myStruct
{
int charsize ;
CString cstrFilePath;
myStruct() : charsize (0)
{
cstrFilePath.Empty();
}
} ;
|
|
|
|
|
pandit84 wrote: Before crash ,value of cstrFilePath is empty. Which is rather irrelevant. What I asked was, what is the value of structRef when the crash occurs?
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
You have supplied very little to go on, so in addition to suggesting you provide more information I'll ask a question: are you allocating memory in one module and freeing it in another (a module is a dll or exe)?
Steve
|
|
|
|
|
I am sorry for adding incomplete info.
I have allocated memory to object of structure myStruct in one dll and passed this struct object as a reference to another dll. This crash happens only while assinging value to
structRef.cstrFilePath variable. Finally I was able to assign value inside CString variable using
wsccpy method. I was able to resolve this crash with following code , but I am sure this is not the correct way to do it.
wcscpy (structRef.cstrFilePath.GetBuffer (), str.GetBuffer ()) ;
I am still trying to resolve this issue in a correct way. I am using Windows 7 system and GCC Compiler. Thanks all for replying to my previous post.
|
|
|
|
|
Unless you configure things properly each module (dll or exe or other executable module) has it's own heap. In this environment you can't allocate memory in one module and free it another. Given that CString manages a buffer using an instance in multiple modules could result in this happening. Forget wcscpy, it's ugly and isn't a fix for the root problem, whatever it is. If it's heap corruption, which is my guess, it's going to blow up sooner or later and "fixing" one problem with an ugly hack will just result in it popping up somewhere else.
Steve
modified 5-Dec-12 11:14am.
|
|
|
|
|
Finally I have solved this issue.
The CString when used with GCC was Used as LinuxCString which is internally std::string. Capacity of std::string when calculated was every time 0. so when I tried to assign const char* to LinuxCString ( i.e. CString in MSVC ) it was crashing.
I have used std::string.reserve (200) method to specify the capacity first while initialization. This solves my issue.
I am still evaluating whether my fix is perfect or not.
Thanks all
|
|
|
|
|
The fix is far from perfect, you shouldn't need to call reserve. If I were you I'd be looking for the real problem.
Steve
|
|
|
|
|
Hi, I am developing an application that toggles the screen in Debian 6 Platform.
In earlier days I done this with Debian 5, It works good. But if I use the same code in Debian 6, I face a segmentation fault in libgtk-x11-2.0.so.2000.0 and libgdk-x11-2.0.s0.2000.0. Since they are Library files I cant do anything with that. Is there any other possibility to prevent my application from facing Segmentation fault???
Expecting for a quick reply
Thanks & Regards
Srivathsan
|
|
|
|
|
I don't think anyone is likely to be able to guess why your program fails. You need to do some diagnosis to find out where the segmentation fault occurs, and what the last call out from your code was.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
This is the Snippet I got when tried to trace the Segmentation fault using GDB
#0 0xb7281601 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#1 0xb7282835 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#2 0xb7052381 in ?? () from /lib/libglib-2.0.so.0
#3 0xb7054305 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#4 0xb7057fe8 in ?? () from /lib/libglib-2.0.so.0
#5 0xb7058527 in g_main_loop_run () from /lib/libglib-2.0.so.0
#6 0xb7418b69 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#7 0x080e82a1 in main_callback (data=0x0) at src/dispimage.c:155
#8 0xb707e6cf in ?? () from /lib/libglib-2.0.so.0
#9 0xb77a7955 in init_rotgrids(rotgrids**, int, int, int, double, int, int, int, int) () from /lib/i686/cmov/libpthread.so.0
#10 0xb6f99e7e in clone () from /lib/i686/cmov/libc.so.6
|
|
|
|
|
#7 0x080e82a1 in main_callback (data=0x0) at src/dispimage.c:155
I guess that's your first clue. But really, you have to do some analysis here; we cannot begin to guess what is going on in your code.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
I tried out with GDB to detect the place where Segmentation fault Occurs. I cant able to retrieve any local Variable's Information at that place. Is there any good tool to trace Segmentation Fault?
Thanks & Regards
Srivathsan
|
|
|
|