|
I am curently loading a dll like this
static HMODULE hMod ;
hMod = LoadLibrary("Updater.dll");exit(1);
if(!hMod)
{
AfxMessageBox("not found !!!!!");
exit(1);
}
FreeLibrary(hMod);
The mfc app loads the mfc dll and exits, but is it possible to define some sort of return value in the mfc dll that the mfc app closes while the dll continue processing?
|
|
|
|
|
Plzz describe u'r question clearly.
|
|
|
|
|
As far as I know a DLL must be used from another application. If you load that DLL from the scope of your app, and then you close your app, this should make the DLL not to continue working.
I can only think on create a service and activate it from your app, this service should control that DLL. Of course this can be a service or another process, but not the program that will be closed.
Hope this helps.
|
|
|
|
|
|
I wrote the below program ,the object (obj) is accessing all methods of RDOSessionClass.But it shows compile time error
that "obj is undeclared identifier"
what is the problem while it is accessing all function but not compiled.
#include <iostream>
#include <tchar.h>
#import "Redemption.dll"
void main()
{
CoInitialize(NULL);
Redemption.RDOSessionClass obj;
obj.Logon(" ",0,0,0,0,);
CoUninitialize();
}
Plz tell me how can i do this.
manu
|
|
|
|
|
Is it the only message coming from the 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 line:
manu_2205 wrote: Redemption.RDOSessionClass obj;
looks very wrong to me. Would you try:
Redemption::RDOSessionClass obj;<br />
instead?
|
|
|
|
|
Maybe your problem is of Redemption.RDOSessionClass if no did you include header files?
|
|
|
|
|
HI,
Recently i am working with a project and I need to embedd notepad in to a Dialog(CDialog).
Can anybody help me??????????
Sherin Iranimose
|
|
|
|
|
if you can describe ur problem in more detail someone here could help you.
Is it specifically the notepad that you need to use or the functionality of it.(Ex: Reading a file and displaying it's content just like the notepad does)
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
hi,
I want to embed a notepad window into a dialog.
Sherin Iranimose
|
|
|
|
|
If you truly need to embed notepad, then you should take a look here in the codeproject or in the MSDN, but I cannot help you. But if you want to get edit capability in your dialog based app, then you could add an edit control and set it multiline. Also you could do it using a richedit control. if you want, you can also use a commercial editor interface like scintilla (there's an article here in the codeproject: http://www.codeproject.com/editctrl/scintillawnd.asp[^]).
Scintilla is easy to use and all the functionality is already made, so you have only to send messages to it (sendmessage or postmessage) and then everything works. is as easy as making a normal button to send the desired message to your scintilla control.
Hope this helps.
|
|
|
|
|
Do you want to insert notepad in window of your program?
|
|
|
|
|
Yes,i want to embed notepad window into a dialog.
Sherin Iranimose
|
|
|
|
|
As we know if a db contains atleast one record and the record pointer is on the First Record IsBOF() will return 0,
and indeed after using m_pSet->MoveFirst() the value of IsBOF() is 0.
But now in MS ACCESS the order of the records are as follows
Ac_No Name Author Type Value Date Stat
<hr>
1111 Christmas Carol Charles Dickens 2 800 12/12/2006 2
1112 The Adventures of Hucklebery Finn Mark Twain 2 799 12/1/2005 1
1113 Chip DVD 06/06 Chip Magazine 1 100 1/6/2006 1
1114 Christmas Carol Charles Dickens 2 800 12/11/2006 1
1118 Last Christmas Eagles 1 299 1/4/2005 1
1119 The Adventures of Robinson Crusoe Daniel Dafoe 2 799 1/2/2002 1
<hr>
Even after issuing MoveFirst() the pointer is pointing to 1118.
weird
Note: the fields might be a bit mangled plz bear.
Shouvik
|
|
|
|
|
shouvik.d wrote: Even after issuing MoveFirst() the pointer is pointing to 1118
Have you queried for all these records ? If yes, have you used any ORDER BY clause ? Can you show that code ?
|
|
|
|
|
can u let me know one thing.
if in access i'm getting that specified view doesn't make sure that internally the record is stored in that order only.
is it so. then this clarifies all my query.
i mean i've entered all my recs in an ascending order format by Ac_No as primary key. So the disp is also in ascending order of the values of Ac_no. does that not mean the internal record storage order is the same
Shouvik
|
|
|
|
|
shouvik.d wrote: if in access i'm getting that specified view doesn't make sure that internally the record is stored in that order only
Not sure.
|
|
|
|
|
Here's my code.
plz help u've always been to my rescue first time;)
<code>m_pSet->Close();
query="Select * from Book where Name like '%"+name.Left(5)+"%' AND Author LIKE '%"+auth.Left(5)+"%' Order By Ac_No" ;
m_pSet->Open(CRecordset::dynaset, (LPCTSTR)query,CRecordset::none);
m_pSet->MoveFirst();
do
{
Item.Empty();
name=m_pSet->m_Name;
auth=m_pSet->m_Author;
Item=m_pSet->m_Ac_No+"\t"+name+"\t"+auth+"\t"+CLibManView::GetStatus(m_pSet->m_Stat);
lb->AddString(Item);
m_pSet->MoveNext();
}while(!m_pSet->IsEOF());
</code>
Hope this is suff 4 u
Shouvik
|
|
|
|
|
shouvik.d wrote: query="Select * from Book where Name like '%"+name.Left(5)+"%' AND Author LIKE '%"+auth.Left(5)+"%' Order By Ac_No" ; m_pSet->Open(CRecordset::dynaset, (LPCTSTR)query,CRecordset::none);
I hope this gives you expected no. of records.
Use CRecordset::m_strSort to sort the records.
|
|
|
|
|
I tried but funniest part is its adding the records instead of sorting them so i used a query instead.
Shouvik
|
|
|
|
|
shouvik.d wrote: I tried but funniest part is its adding the records instead of sorting them
Can you show code ? what you have tried ?
It can be,
m_pSet->Open();
m_pSet->m_strSort = "par, par1";
m_pSet->Requery();
|
|
|
|
|
But the records are already sorted.
Shouvik
|
|
|
|
|
shouvik.d wrote: But the records are already sorted
By what ? If it is sorted by Ac_No , MoveFirst() should point to correct record in order.
|
|
|
|
|
I said its all entered in Ascending order.
So the retrievel is sorted irrespective of anything.
Still the pointer remains stuck at 1118. i'm g:(ing nuts
Shouvik
|
|
|
|