|
Hi,
I am asking your help instaed I am using 3rd party library as I know I will not get help from them..
I have third party tools which is having almost 7 (dll and .dll.a) files and 10 source .h and .c files.
I need to add only source and .dll.a files and keep along with this file.
But I am getting run time error "Unhandled exception at 0x00018740 in Sample.exe: 0xC0000005: Access violation reading location 0x00018740"
I think I application is not able to read code from dll file. Or else what might be the cause?
|
|
|
|
|
john5632 wrote: I think I application is not able to read code from dll file.
This doesn't make any sense.
john5632 wrote: Or else what might be the cause?
Use your debugger to locate the problem more precisely and inspect the different variables. Once you have more information and are still stuck, post the details here.
Basically, the error message means that you are trying to read at a memory location to which you are not allowed to (it could be by trying to access a NULL pointer, or an unitialized pointer for instance, but it could be from a lot of other reasons). The only way to fix it, is to inspect your code with a debugger to find the problem.
|
|
|
|
|
How can I make sure that I am able to use all dll files?
|
|
|
|
|
Hello,
I have an application that allows you to import contacts from outlook,
when you click on import it open that outlook 'folder select menu' and you select the folder you want to import the contacts from.
so far it's all good,
what I want to do now is to make this automatic,
I need to find a way to save the selected folder, so next time the user will load the application it will know from which folder to take the contacts from.
This is the code I'm using now:
_ApplicationPtr pApp;
_ItemsPtr pItems;
MAPIFolderPtr pFolder;
HRESULT hr;
hr=pApp.CreateInstance(__uuidof(Application));
pFolder = pApp->GetNamespace(_bstr_t("MAPI"))->PickFolder(); //here the user select folder
pItems=pFolder->GetItems();
.....and so on
basically I need to save the selected MAPIFolderPtr pFolder to the registry as a string
and then convert it back to MAPIFolderPtr pFolder from the string.
Thank you!
|
|
|
|
|
OK after breaking my head with that for over a day I found a solution:
1. pFolder = pApp->GetNamespace(_bstr_t("MAPI"))->PickFolder();
2. char *folder_id = _com_util::ConvertBSTRToString(pFolder->EntryID);
3. _bstr_t new_folder_id = _com_util::ConvertStringToBSTR(folder_id);
4. pFolder = pApp->GetNamespace(_bstr_t("MAPI"))->GetFolderFromID(new_folder_id);
save folder id:
1. select folder
2. save the folder id to char
... write to registry or whatever
read folder id:
.... read from registry or whatever
3. convert it to bstr
4. get your selected folder by its id.
hope this will help some one.
|
|
|
|
|
I have application on Visual C++ 6. I made dump file when it was working and open the dump in Visual Studio 2005. In the dump I cannot see what happened inside mfc42u.dll, because file mfc42u.pdb I have 'does not match'. I retrieved that mfc42u.pdb from msdl.microsoft.com/download/symbols. Where can I get file mfc42u.pdb that will be 'match'?
|
|
|
|
|
For Resolving the diamond ring problem we derived the base class as a virtual. Then what are the size of following class:
Class Base
{
public:
virtual void Play();
}
Class Derived : public virtual Base
{
public:
virtual void Play();
}
Class Derived1 : public virtual Base
{
public:
virtual void Play();
}
Class Derived2 : public Derived,Derived2
{
public:
void Play();
}
Now question is Sizeof(Base) = ?? and why??
Sizeof(Derived1) = ?? and why??
Sizeof(Derived2) = ?? and why??
Sizeof(Derived3) = ?? and why??
What are the object layouts??
|
|
|
|
|
Looks like you need a compiler...
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 have to load a .png image on my button. Can some one please help me out how I can do this in MFC.
Thanks in advance..
|
|
|
|
|
You can load PNG images using CImage[^] class.
Another option is a GDI+ Bitmap[^] class.
And if you are using MFC 9.0.30411 or later, you could also use a CPngImage[^] class.
|
|
|
|
|
Thanks for ur reply, can u please provide me some code example..
Thaks a lot
|
|
|
|
|
My code is like this :
CImage C_PngImage;
PngImage.Load(_T("c:\\123.png"))
but I don't know how to load on the button.
Can u please now what to do next.
Thanks
|
|
|
|
|
AbhiHcl wrote: but I don't know how to load on the button.
You mean load the image on a button click event or load the image and display it on a button (image button)?
|
|
|
|
|
I mean load the image on the button drawitem().
|
|
|
|
|
In that case I'd suggest you read this[^] article about buttons that support PNG files with transparency.
You could use the class provided in the article directly or
you could investigate the source code to see how it works.
|
|
|
|
|
How to find the average, worst complexity of a code??
say for ex,
for i= 1 to n
{
}
for j= 1 to i
{
x=x+1
}
Please help me ..
|
|
|
|
|
Huh?
Did you bother looking at your post? Notice anything "strange" about 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
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
You have to claculate from your program; for this example
first for loop execute "n" times and second loo execute n times because value of "i" is "n"
suppose "T1" time need to execute one iteration in the first for loop and "T2" time needs for one iteration in second loop
so it take T1*n + T2*n that is an order of n, ie it depend on input variable "n"
This is the time complexity
|
|
|
|
|
Hai Radhakrishnan,
Thanks for your responce. Can you come again to tell me how it can be represented in Big O notation...
|
|
|
|
|
O(n) ?
Watched code never compiles.
|
|
|
|
|
Yes it is the order of n O(n)
|
|
|
|
|
Hi All,
Im working on transcoding media streams using ffmpeg.
And,I am using av_open_input_file to open the video file.
But,It always fails.
Can anybody help me?
|
|
|
|
|
gmallax wrote: But,It always fails.
This sort of problem description really does not mean anything. If your program fails then you need to explain exactly what error messages or exceptions you see. Only then can anyone begin to guess what may be wrong.
It's time for a new signature.
|
|
|
|
|
Did you call av_register_all() ? It's like CoInitialize, you need to call it before calling anything else.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Hiya,
It would be helpful if someone tell me how I could convert ostringstream to tchar* such that it will work in both ansi and unicode compilation. currently i have done like:
std::ostringstream strn;
strn <<"Just do it!";
const TCHAR* tata = static_cast< LPCTSTR >(strn.str().c_str());
But this does not seems to work in both the cases.
|
|
|
|