|
Could you also reformat your code properly? For instance CArray is a template container, but I don't see any argument between < > .
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]
|
|
|
|
|
done
|
|
|
|
|
Probably Cédric's guess [^] is right.
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 guess it is because CArray and CStringArray don't have a copy constructor. So, the compiler will assign a default copy constructor and assignment operator to your structure which 'uses' the copy ctor and assignment operator of the CArray and CStringArray, which are private. One way to fix this is to provide your own copy constructor and assignment operators for the structure. In those, copy the contents of the arrays using a loop (instead of a direct assignment).
|
|
|
|
|
Hi! I guess you are right! you mean I have to derive my own CArray class? isn't another way I mean another array class that can do the trick!
thanks
|
|
|
|
|
Electronic75 wrote: you mean I have to derive my own CArray class
No, I mean you have to provide a =operator and a copy constructor for your structure. Inside those, instead of simply assigning the arrays, like this:
mystruct::myStruct(const mystruct& copy)
{
array1 = copy.array1;
}
you will need to copy the content of the array by iterating over it.
Electronic75 wrote: isn't another way I mean another array class that can do the trick!
std::string or std::list maybe ? But you have to be carefull of what is inside those arrays. If you store pointers, you will have a copy of the original pointer pointing at the same memory location, so you should only delete one of them (so, it's a bit dangerous).
|
|
|
|
|
Thanks a lot Cedric, It worked pretty much OK
|
|
|
|
|
|
What do you need to do ? In fact you are looking at it the wrong way: don't take into account that you have a USB port in between, this will be 'hidden' for you. In fact you need to communicate with the driver of the PocketPC (generally through ActiveSync). What are you trying to achieve exaclty ? Take a look at RAPI[^], this is what is already available.
|
|
|
|
|
I want to transfer some data to the WinCE using USB.
I have a USB cable's one end connected to my PC running a VC++6.0 Application and to the WinCE.
Priya Sundar
|
|
|
|
|
Did you read my previous message ?
Because it looks like you didn't...
|
|
|
|
|
i need to create a .MSG file on my local disk the saveas function of _Mailitem of outlook programming fails.
Also i need to create .EML files that can take rtf data as an input or message body.
these both i have to create in vc++ 6.0 not in .net application.
Thanks,
Regards,
Ravi
|
|
|
|
|
Hello everyone,
I am developing a C++ COM client (COM consumer) using #import statement, even if it works fine, I still find one issue when reading MSDN document about #import.
http://msdn.microsoft.com/en-us/library/8etzzkb6(VS.80).aspx
In the document, it mentioned two header files will be generated -- TLI and TLH files. But in my client project directory, there is only one tlh file. I am using VS 2008. My questions is why the tli file is missing, if not missing, where is it?
thanks in advance,
George
|
|
|
|
|
probably you are importing tlb with no_implementation attribute.
Regards,
Sandip.
|
|
|
|
|
Thanks Sandip,
Here is my IDL file. I do not explicitly assign the no_implementation attribute. Any ideas?
#pragma once
#pragma pack(push, 8)
#include <comdef.h>
namespace TestATL1Lib {
struct __declspec(uuid("1f97c59f-609d-4f86-ba31-db9fd88bbbd4"))
__TestATL1Lib;
struct bbbb;
struct __declspec(uuid("2bd6b985-3287-492f-a781-decdd03ca0d0"))
Ibbbb;
struct cccc;
struct __declspec(uuid("1a3a642c-50c0-4c30-9807-3bf4727a1157"))
Icccc;
_COM_SMARTPTR_TYPEDEF(Ibbbb, __uuidof(Ibbbb));
_COM_SMARTPTR_TYPEDEF(Icccc, __uuidof(Icccc));
struct __declspec(uuid("9b0304a2-a49a-4a3b-8d40-a05c4d7c009b"))
bbbb;
struct __declspec(uuid("2bd6b985-3287-492f-a781-decdd03ca0d0"))
Ibbbb : IDispatch
{};
struct __declspec(uuid("f68bfdc9-ebe3-424e-80ef-ed6465087c60"))
cccc;
struct __declspec(uuid("1a3a642c-50c0-4c30-9807-3bf4727a1157"))
Icccc : IDispatch
{};
}
#pragma pack(pop)
regards,
George
|
|
|
|
|
i do not have much experience with COM, but how does your TLH file look like
because TLI file contains implementation for compiler generated wrapper functions specified in .tlh file.
Regards,
Sandip.
|
|
|
|
|
Thanks Sandip,
Here is what the tlh file looks like. Now with my posted TLH and TLI files, do you have any ideas why there is no tli file generated?
#pragma once
#pragma pack(push, 8)
#include <comdef.h>
namespace TestATL1Lib {
struct __declspec(uuid("1f97c59f-609d-4f86-ba31-db9fd88bbbd4"))
__TestATL1Lib;
struct bbbb;
struct __declspec(uuid("2bd6b985-3287-492f-a781-decdd03ca0d0"))
Ibbbb;
struct cccc;
struct __declspec(uuid("1a3a642c-50c0-4c30-9807-3bf4727a1157"))
Icccc;
_COM_SMARTPTR_TYPEDEF(Ibbbb, __uuidof(Ibbbb));
_COM_SMARTPTR_TYPEDEF(Icccc, __uuidof(Icccc));
struct __declspec(uuid("9b0304a2-a49a-4a3b-8d40-a05c4d7c009b"))
bbbb;
struct __declspec(uuid("2bd6b985-3287-492f-a781-decdd03ca0d0"))
Ibbbb : IDispatch
{};
struct __declspec(uuid("f68bfdc9-ebe3-424e-80ef-ed6465087c60"))
cccc;
struct __declspec(uuid("1a3a642c-50c0-4c30-9807-3bf4727a1157"))
Icccc : IDispatch
{};
}
#pragma pack(pop)
regards,
George
|
|
|
|
|
I cant see any function in TLH so i think compiler is not generating corresponding TLI.
I tried creating test.tlb without any contents and it gave me only .TLH
#pragma once
#pragma pack(push, 8)
#include <comdef.h>
namespace TESTLib {
}
#pragma pack(pop)
</comdef.h>
Does it make sense.
Regards,
Sandip.
modified on Thursday, September 11, 2008 4:42 AM
|
|
|
|
|
Thanks Sandip,
I have tried, you are correct. When adding some methods in some interface, the tli file is generated.
Here is the content of tli file when I add method FooAbc to interface IAbc.
inline HRESULT IAbc::FooAbc ( ) {
HRESULT _hr = raw_FooAbc();
if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
return _hr;
}
regards,
George
|
|
|
|
|
hi everyone, m working on retrieving all MS products that are installed on a system and that appear in add/remove programs. i heard about WMI, with which we can retrieve. But, its disadvantage is, it retrieves only those softwares that are installed by MSI. i also found another way that is registry where HKLM/software/microsoft/windows/currentversion/uninstall path where we can get all installed products. but, here m not getting any details about child products that come along with parent product. is there any way that you can suggest?
|
|
|
|
|
Well you said registry is best place for you I think on the registry you can see a folder its name is install I think.
|
|
|
|
|
I believe the child products( ) will also be listed in HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall path..
Regards,
Rane
|
|
|
|
|
Hi guys,
i am having some problm while building my C code through VC++6.0. The following error i am getting while building:
--------------------Configuration: ReportVARS - Win32 Debug--------------------
Compiling...
ReportVARS.c
VALIDATE.C
ALLOC.C
BASENAME.C
BTRVUTIL.C
COBLUTIL.C
C:\Documents and Settings\IVarma\Desktop\kunda\FINALCODE\COBLUTIL.C(98) : warning C4244: '=' : conversion from '__int64 ' to 'long ', possible loss of data
C:\Documents and Settings\IVarma\Desktop\kunda\FINALCODE\COBLUTIL.C(116) : warning C4244: '=' : conversion from '__int64 ' to 'long ', possible loss of data
C:\Documents and Settings\IVarma\Desktop\kunda\FINALCODE\COBLUTIL.C(191) : warning C4244: '=' : conversion from '__int64 ' to 'long ', possible loss of data
C:\Documents and Settings\IVarma\Desktop\kunda\FINALCODE\COBLUTIL.C(208) : warning C4244: '=' : conversion from '__int64 ' to 'long ', possible loss of data
CPPPORT.C
DATE.C
FATAL.C
GETOPT.C
LEAPYEAR.C
LOG_DIAG.C
LOWERCAS.C
MISC.C
MONTHDAY.C
PHCLUST.C
REPORT.C
SKIPWHIT.C
STATUS.C
TODAY.C
TRUNC.C
UPPERCAS.C
BTRAPI.C
Linking...
BTRAPI.OBJ : error LNK2001: unresolved external symbol _WBRQSHELLINIT@4
BTRAPI.OBJ : error LNK2001: unresolved external symbol _BTRCALL@28
BTRAPI.OBJ : error LNK2001: unresolved external symbol _BTRCALLID@32
Debug/ReportVARS.exe : fatal error LNK1120: 3 unresolved externals
Error executing link.exe.
PLS suggest on THIS..
;---ISHWAR
|
|
|
|
|
Are you linking with the right library that holds these functions?.
Regards,
Rane
|
|
|
|
|
yes.....function is available in BRTAPI.c code......n hav included this file in ma project. and thn ater m tryin to compile it.....but thn it throws new erro:
--------------------Configuration: ReportVARS - Win32 Debug--------------------
Compiling...
ReportVARS.c
VALIDATE.C
ALLOC.C
BASENAME.C
BTRVUTIL.C
COBLUTIL.C
C:\Documents and Settings\IVarma\Desktop\kunda\FINALCODE\COBLUTIL.C(98) : warning C4244: '=' : conversion from '__int64 ' to 'long ', possible loss of data
C:\Documents and Settings\IVarma\Desktop\kunda\FINALCODE\COBLUTIL.C(116) : warning C4244: '=' : conversion from '__int64 ' to 'long ', possible loss of data
C:\Documents and Settings\IVarma\Desktop\kunda\FINALCODE\COBLUTIL.C(191) : warning C4244: '=' : conversion from '__int64 ' to 'long ', possible loss of data
C:\Documents and Settings\IVarma\Desktop\kunda\FINALCODE\COBLUTIL.C(208) : warning C4244: '=' : conversion from '__int64 ' to 'long ', possible loss of data
CPPPORT.C
DATE.C
FATAL.C
GETOPT.C
LEAPYEAR.C
LOG_DIAG.C
LOWERCAS.C
MISC.C
MONTHDAY.C
PHCLUST.C
REPORT.C
SKIPWHIT.C
STATUS.C
TODAY.C
TRUNC.C
UPPERCAS.C
BTRAPI.C
Linking...
BTRAPI.OBJ : error LNK2001: unresolved external symbol _WBRQSHELLINIT@4
BTRAPI.OBJ : error LNK2001: unresolved external symbol _BTRCALL@28
BTRAPI.OBJ : error LNK2001: unresolved external symbol _BTRCALLID@32
Debug/ReportVARS.exe : fatal error LNK1120: 3 unresolved externals
Error executing link.exe.
PLS LOOK INTO THIS..
-----ishwar
|
|
|
|