|
_Nanon_ wrote: but all the information is about C# or VB
Well, the interfaces used and the flow of how to accomplish something is the same no matter what language the client is implemented in.
If you find a good example of what you want to do, but it's not written in the language you'd prefer, I suggest you study the flow and the function arguments anyway. It would get you a picture of what you need to do and in what order to do it.
You might even get a little understanding of the other language as well while you're at it and that must be a good thing, right?
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
I found examples in VB, but the problem it is not th algorithm, the problem is where can i found information about arguments for VC++, because it is different between C#,C++ and VB (I think, but i am not sure) to use the CWorkSheet (CWorkBook....)
I am tried:
CWorkSheet MYSHEET.copy(_variant_t(SHEET),_variant_t(SHEET))
CWorkSheet MYSHEET.copy(_variant_t(NUMBER),_variant_t(NUMBER))
CWorkSheet MYSHEET.copy(_variant_t(SHEET NAME),_variant_t(SHEET NAME))
CWorkSheets MYSHEETS.copy(_variant_t(SHEET),_variant_t(SHEET))
CWorkSheets MYSHEETS.copy(_variant_t(NUMBER),_variant_t(NUMBER))
CWorkSheets MYSHEETS.copy(_variant_t(SHEET NAME),_variant_t(SHEET NAME))
|
|
|
|
|
_Nanon_ wrote: but i dont now what parameters i need to send. (It ask for two Variants).
Yes they hide that information in the Documentation[^]
led mike
|
|
|
|
|
I already read this documentation, and i tried to use an CWorksheet element as argument for the function, but it does not work.
_Nanon_
|
|
|
|
|
_Nanon_ wrote: I already read this documentation, and i tried to use an CWorksheet element as argument for the function,
Before I gave you the link? Because your earlier posts said you didn't know what to send as arguments.
led mike
|
|
|
|
|
_Nanon_ wrote: I already read this documentation
Obviously not, since it clearly says that you cannot specify both Before and After which is exactly what you have done in every case in the reply you sent to my post.
Furthermore the documentation says that Excel will create a new workbook if you specify neither Before nor After .
I suspect the parameters could be either integers (VT_I4 ) specifying the index of the sheet or strings (VT_BSTR ) specifying the name of the sheet.
I haven't tried it though so I'm not sure.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
I am agree with you, but i am not able to use only one argument, i dont know what i need to write to use copy with before option for example.
I tried to pass VT_I4 and VT_BSTR parameters, but it does not work.
Thanks
|
|
|
|
|
Try recording a macro while you're copying a worksheet.
Then you can read the resulting VBA code to figure out how to do it. You just have to translate it to C++. That's what I do when I need to figure out to do things with Excel and I cannot find an example of how it should be done, including creating diagrams.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
The problem is solved:
The argument used must be the Worksheet DISPATCH, then all works correctly.
Thanks a lot to Roger Stoltz and to led mike for your help.
|
|
|
|
|
hi,
i am new to IPC - shared memory.
is it possible to store a message with the index in shared memory so that a particular message could be retrieved using the index?
is there anyway of storing a structure in a shared memory?
help me out..
adavance thanks..
Sangeetha
|
|
|
|
|
sungita wrote: is it possible to store a message with the index in shared memory
Yes.
sungita wrote:
is there anyway of storing a structure in a shared memory?
Yes.
See my article XQueue for details.
Best wishes,
Hans
|
|
|
|
|
it's already sorted mam!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi,
When we are using shared PCs, like in an internet cafe, how do we make sure that there are no Keylogger software running in the background?
Regards,
Blumen
|
|
|
|
|
|
humm google dude!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi
Please look at this code:
#include <iostream><br />
using namespace std;<br />
<br />
class MyClass<br />
{<br />
private:<br />
int d;<br />
public:<br />
int x;<br />
};<br />
int main()<br />
{<br />
MyClass a;<br />
cout << a.x;
}
I only added one function
<br />
#include <iostream><br />
using namespace std;<br />
<br />
class MyClass<br />
{<br />
private:<br />
int d;<br />
public:<br />
int x;<br />
void print(){ cout << d;}; <br />
};<br />
int main()<br />
{<br />
MyClass a;<br />
a.print();<br />
cout << a.x;
}
But if i write a.print(); after cout << a.x; it gives me run-time error again.
So why is this so?
It says: "a' is being used without being defined." But when i call function it doesnt give error. So is calling function means defining a class?
I do not understand why it gives error first and third but doesnt give error second one.
Can you please help me.
Thanks.
|
|
|
|
|
what if you do this in your main() :
void main() {
MyClass a<code>()</code>;
cout << a.x;
}
|
|
|
|
|
Sorry i don't understand what you mean
|
|
|
|
|
sawerr wrote: Sorry i don't understand what you mean
i just asked if adding parenthesis produces the error too or not
|
|
|
|
|
I am not trying to solve the problem.
I am trying to understand what happening in VC++ compiler internals.
Other debuggers dont give this error but VS2005 gives in the first and third example but not others.
If i call a func. first it doen't give error but if i dont, it gives error.
I am trying to solve why it is so.
Thanks.
|
|
|
|
|
Hi,
just some "non-professional" questions.
Have you tried to derive your class from CObject?
class MyClass : public CObject
Give the class a constructor?
class MyClass
{ //...
MyClass ();
//...
}
inline void MyClass::MyClass () {x = 123; d = 456;}
What about if u give first a value to "x"?
int main()
{
MyClass a;
a.x = 123; //I mean so.
cout << a.x;
}
Im not sure (I'm not so good as other users here) but maybe your error is related to "trush" in memory when you use your class.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
The debug runtime is warning you that you are about to use an uninitialized object.
The member variables of the MyClass object are not initialized. You need to provide a constructor
or initialize them some other way to prevent the warning.
Note that you can continue running after the warning.
class MyClass
{
private:
int d;
public:
int x;
MyClass() {d = 0; x = 5;}
};
int _tmain(int argc, _TCHAR* argv[])
{
MyClass a;
cout << a.x;
int x;
cin >> x;
return 0;
}
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hi,
Im hoping to build an application that would monitor activity on a PC caused by other users logged in over a network or a Microsoft Domain (wateva u mite call it in network jargon ). Would this be possible ? Would i be able to get a handle to the event when a user logs into any of my shared folders, by accessing my PC ?
Please give me some pointers,
thanx.
|
|
|
|
|
erajsri wrote: Would i be able to get a handle to the event when a user logs into any of my shared folders, by accessing my PC ?
See NetConnectionEnum() .
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
That is Ok, but what about any events that would fire when a user establishes a connection to a shared resource ( like a shared file or folder ), or is that unsupported ?
Where could I get more infor on how file sharing is done on Windows and developing applications for that ?
|
|
|
|