|
Hi all,
how to use extended MAPI as redemption.dll is used..please check http://www.dimastr.com/redemption/security.htm for more details..I want to make something like that..so that when I access any object of outlook to post some data it doesnt show me any error..anyone has any clue about it..any ideas or tutorials or pointers are highly appreciated..
Thanks a lot in advance..
Himanshu
|
|
|
|
|
Hi,
Is the following possible with Visual C++ .Net:
class.h:
template<class t="">
class A
{
public:
T* GetT();
private:
T* m_T;
}
class.cpp:
template<class t="">
T* A<t>::GetT()
{
return m_T;
}
If so, what is the correct syntax? The above gives me a linker error saying 'undefined reference to A<t>::GetT()', which basically means to me that class.cpp is not included in the compilation somehow, or at least that the contents of class.cpp are not associated with the declaration in class.h (correct me if I'm wrong on this).
I hope my question is clear enough, thanks for all insights!
cheers,
roel
|
|
|
|
|
You can't do this at the moment with Visual C++. The definition of the template must be available to the compiler at the point of instantation, including the definitions of all methods.
In practical terms, this means you must define the function in the class.h header file.
At a rough guess, it should look something like:
template <typename T>
class A
{
public:
T* GetT();
private:
T* m_T;
};
template <typename T>
T* A<T>::GetT()
{
return m_T;
} Hope this helps.
By the way, to format your code on CodeProject, for small snippets, use the <code> attribute; for larger ones, use <pre>. To get angle brackets to render, you must use the < and >, or use the 'no HTML' check-box.
|
|
|
|
|
You can't do this at the moment with Visual C++.
Bummer I hope they'll add support for that soon...
By the way, to format your code on CodeProject, for small snippets, use the attribute; for larger ones, use
.
Yeah I should have done that, I'll remember it next time, thanks.
|
|
|
|
|
Whoops I screwed up on that one Hehe.
|
|
|
|
|
It's the semi-infamous export keyword.
Exporting a template is supposed to mean that it only gets parsed and part-compiled once. However, C++'s template model means that you can only formulate the final code for an instantiation if you have access to a partly-chewed representation of the template. The current implementations that do export - IIRC, only Comeau C++[^] currently - do so by placing a dump of the syntax tree for the template in a separate file with a name it's guaranteed to find.
You'll never get a situation where you can just ship a template implementation as a binary.
|
|
|
|
|
You'll never get a situation where you can just ship a template implementation as a binary.
I know but that's not why I want it - it's just to make the interface cleaner (interface in .h file, implementation in .cpp file). But thanks for your explanation!
cheers,
roel
|
|
|
|
|
Gnarf wrote:
I hope they'll add support for that soon...
maybe not... some of the world's experts are talking about trying to get export removed from the standard. Even EDG, the world's leading compiler front end designers say that export makes little difference to build times, possibly even increasing them, whilst possibly changing the meaning of some C++ code.
http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1426.pdf[^]
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
Very interesting, thanks!
|
|
|
|
|
Hi,
I need a code for a tool like CMD.exe. I want to do some changes to it and add some custom features to meet my spoecific needs. Any help will be appreciated.
Regards
Cutti
|
|
|
|
|
write a kernel dude.
|
|
|
|
|
Try http://www.freedos.org/
|
|
|
|
|
hi all,
i am trying to run a query like this ----
CDatabase database;
CString sDriver = "MICROSOFT ACCESS DRIVER (*.mdb)";
CString sDsn;
CString sFile = "c:\\MDD.mdb";
sDsn.Format("ODBC;DRIVER={%s};DSN='';DBQ=%s",sDriver,sFile);
TRY
{
database.Open(NULL,false,false,sDsn);
}
CATCH(CDBException, e)
{
}
END_CATCH
database.ExecuteSQL("SELECT MAX(dist) INTO temp FROM TempTable");
***********************************************************************
TempTable is a dynamically generated temporary table.My problem is that i need to get the result of the above query into a variable.
any help to solve this problem will be appreciated....
Thanks and regards.
|
|
|
|
|
vcseeker wrote:
database.ExecuteSQL("SELECT MAX(dist) INTO temp FROM TempTable");
Probably, in your query, you don't want to mean "INTO temp", you want to mean "AS TEMP".
"INTO temp" creates a temporary table and does not return any record.
"AS temp" names the column MAX(dist) as "temp".
ORACLE One Real A$#h%le Called Lary Ellison
|
|
|
|
|
hi Daniel,
Thanks for quick reply.
Actuall i am running the Query--
database.ExecuteSQL("SELECT MAX(dist) FROM TempTable");
and i want to get the result in a local variable that is declared inside my function .I want to assign the value of MAX(dist) into this local vaiable.
something like this...
int local;
local = database.ExecuteSQL("SELECT MAX(dist) FROM TempTable");//I Wish i could be able to do that.
Can you help me in achieving this.
Regards.
|
|
|
|
|
Just a suggestion: perhaps use the CRecordset class to navigate and getting data from your records. Take a look at the MSDN documentation.
Hope this helps.
|
|
|
|
|
Thanks all,i solved the problem using CRecordset.
|
|
|
|
|
Hi all,
I need to know about any Windows API using I can change the network configuration e.g.
IP Address
Subnet Mask
Default Gateway
etc.
of a particular NIC on my machine.
Any help is apreciated
thanks
|
|
|
|
|
hi!
i want to develop file filters for win2k.
i have installed win2k ddk.
i am using visual c++6.0 Enterprise Edition
i tried to run samples provided with the ddk.
/src/storage/filters/diskperf
when i compiled it i got 102 erros,just pasting a couple:
c:\ntddk\inc\ddk\ntddk.h(370) : error C2061: syntax error : identifier 'PULONG_PTR'
c:\ntddk\inc\ddk\ntddk.h(371) : error C2059: syntax error : '}'
c:\ntddk\inc\ddk\ntddk.h(824) : error C2061: syntax error : identifier 'KSPIN_LOCK'
c:\ntddk\inc\ddk\ntddk.h(824) : error C2059: syntax error : ';'
c:\ntddk\inc\ddk\ntddk.h(825) : error C2143: syntax error : missing '{' before '*'
c:\ntddk\inc\ddk\ntddk.h(3654) : error C2061: syntax error : identifier 'ULONG_PTR'
so i traced back the definitions of 'PULONG_PTR',
'ULONG_PTR' etc.. those are defined in basetsd.h
basetsd.h is included in ntdef.h which is inturn included in ntddk.h, for which we are getting the errors.
there are 2 versions of basetsd.h on my system
one provided by ms-visual studio and the other is provided by win2k ddk.
the basetsd.h provided by win2k ddk has the definitions of the 'PULONG_PTR','ULONG_PTR' etc..
while compiling the compiler is taking basetsd.h provided by ms-visual studio and not the one provided by win2kddk.
so i changed the path in #include for basetsd.h in ntdef.h
so that while compling ddk's verion of basetsd.h is used.
i complied and it worked 102 errors were cut down to 3 following ones:
c:\ntddk\inc\ddk\ntddk.h(9106) : error C2061: syntax error : identifier 'PCONTEXT'
c:\ntddk\inc\ddk\ntddk.h(9107) : error C2059: syntax error : '}'
c:\ntddk\inc\ddk\ntddk.h(10347) : fatal error C1189: #error : "Target architecture not defined"
now i dont know whats the problem.
the ddk is not compatilbe with vc complier or i cannot guess.
so please enlighten me with the above said problem
regards
anshu
|
|
|
|
|
I suspect you're not using the DDK command prompt that the DDK installed, which sets up the include path properly, and you're not using the BUILD tool for building drivers.
Stick to using BUILD .
A good resource for device driver development is OSR Online[^]. I suggest subscribing to their NT Insider newsletter. I seem to recall a back issue describing how to use the VC IDE with the BUILD tool.
|
|
|
|
|
I checked OSR Online, It is a very useful web site for WDM developers.
Thanks Mike,
A. Riazi
|
|
|
|
|
Hi all programmers!
Does anybody know how to set the attribute to Hidden for a file using VC++.
I have only found how to set attributes like Read-only.
Martin_j
|
|
|
|
|
Both attributes can be set with SetFileAttributes .
|
|
|
|
|
Hello all
I'm using ComboBox control and adding some strings to it. Assume that I'm adding 4 strings to ComboBox and at runtime if I select dropdown from ComboBox it's showing only two elements where to see the next two I need to scroll down.
My question is there anyway to see the entire list when dropdown is selected. If anyone knows how to do it, please help me.
Thanks for your help.
Hari.
|
|
|
|
|
Yes, you can enlarge the size at design time by clicking on the arrow and resize the rectangle to the size you want (if it's bigger than all the strings it contains, it will be clipped).
Hope this helps
|
|
|
|