|
I don't have much experience with LCC, but I suppose you can call Win32 APIs from it. It that's the case, you probably can call CryptoAPI.
I hope that you have money because it’s necessary to be practical.
And I hope that at least once a year you put some money in front of you and say "you are mine" just to make clear who owns who. - Victor Hugo
|
|
|
|
|
I guess i'll just have to read up a bit instead but thanks anyway...
I ARE SYSTEM33R!#@
|
|
|
|
|
How to create a IE toolbar in C#?
make my app run in the toolbar?
need resource codes,
Thanks.
|
|
|
|
|
See this article[^].
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
Thank you very much,jdunlap!
|
|
|
|
|
I am seraching for a way to connect Matlab from c#.
I serch for Example like in VB:
Set MatLab = CreateObject("Matlab.Application")
result= MatLab.execute("a=5")
|
|
|
|
|
|
I want to make to rows vertical rather horizontal anyone know how?
much like a cross resultset
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
hi !
there is an article dealing with this topic:
http://www.codeproject.com/useritems/Datatable.asp
bye
andi
|
|
|
|
|
I have a game in c# i'm making
A CPlayer is a
CGeneral is a
CPerson
ok so what if CGeneral and CPlayer need to implement the CEditableObject interface
do I use the override modifier in CPlayer so it overrides CGeneral or would I just do it as normal for both.
I think the first but would like a pointer on this to avoid confusion.
nick
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
I want to develope a voice messenger with .NET framework. I heard about something like MS Speech Server, can it be useful for me in this regard?
Pleas help me tell the solution...
Thanks,
Naveed Ahmad
Naveed Ahmad
naveed@ssghazi.com
|
|
|
|
|
QUESTION 1. Can you pass custom defined object through COM interface? If you "Add Function" (right click classview on an ATL object/class), "Add Member Function Wizard" pops up. One can "choose" parameter type from the list of options available.
But what if I want to pass across interface the following:
a. A result set?
b. A user-defined class:
CMyClass
{
};
How can I do that? And can I do that in the first place?
QUESTION 2: What's the diff between "retval" and "out":
[propget, id(3), helpstring("property ComputerName")] HRESULT ComputerName([out, retval] BSTR* pVal);
"retval" IS "out" isn't it? If pVal is passed as a pointer, why do you need to marked the parameter as [out][retval]?
QUESTION 3: With ATL server projects, how can you add multiple interface? When you add "ATL simple object", the first interface is created for you by the wizard. Do you have do add to IDL file manually for subsequent interfaces? Is all that you need to do is to add to IDL? Any additional steps?
Thanks!
norm
|
|
|
|
|
norm wrote:
QUESTION 2: What's the diff between "retval" and "out":
[propget, id(3), helpstring("property ComputerName")] HRESULT ComputerName([out, retval] BSTR* pVal);
"retval" IS "out" isn't it? If pVal is passed as a pointer, why do you need to marked the parameter as [out][retval]?
retval = return val. in the case of com its the return value of success. I havent done ATL programming in 6 months so bare with me. you return S_OK or S_FAIL. This is built in for com and should be either or. It indicates a pass or fail for the service host.
out is just return value you got that drill.
norm wrote:
QUESTION 3: With ATL server projects, how can you add multiple interface? When you add "ATL simple object", the first interface is created for you by the wizard. Do you have do add to IDL file manually for subsequent interfaces? Is all that you need to do is to add to IDL? Any additional steps?
Well this one is an absolute pain and yes you will have mastered IDL by time you get this one down, i sure did. Add another simple object then add the interface instuctions to the main idl.
And dont forget depending on the clienbt accessing your com depends on the interface you inherit. Scripting versus the other<place the="" name="" i="" forgot="" here="">.
A great book that explains it in detail and in my opinion is invaluable to the ATL/COM programmer
by the way to pass an interface (CMyInterface **ppObject)
as you may know all interfaces are a pointer to a pointer
hope this helps. You might ask this in the ATL subject
nick
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
I havent dealt with COM for almost a year - until recently, I built some stuff using ATL - that's simlpe enuf.
But now, I don't remember anything more than "interfaces are pointer to pointer", nevermind connection points,STA-MTA and all the rest =)
Lucky dot-net arrives. Remoting is rather easy to implement. If my job doesnt require that i code COM/ATL, i'd prefer not and spend more time on the recreational side of my life.
Thanks for feedback.
norm
|
|
|
|
|
by the way if you havent done custom collections in ATL I would seriously by that book. It teaches them the best I've seen which was the sole reason I bought it but it was so good at explaining the core fundamentals of com I read it all the way through.
It also shows vb and c examples of using yoour object so you get a more vast understanding.
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
man, I am so sorry I goofed on retval
its the return value
like number = MyClass.Number;
retval is what is returned by number, sorry dude
{retval,out] is the returned type and [out] is just a pointer or whatever like buffer size on str functions
like [out] int *pVal is the pointer to your int you created before the call
int mine;
like number = MyClass.Number(&mine);
its been a while for c code but that should be right
nick
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
humm... so, what is it. Return value is always S_OK/S_FAIL (HRESULT)??
[propget,id(3),helpstring("property ComputerName")] HRESULT ComputerName([out,retval] BSTR *pVal );
I my client code:
CCATLSimpleClass * pSysInfo = new CCATLSimpleClass;
try
{
//So, here, it's "return" value (and it did worked on my machine, by the way, what if there're more than one "retval"?):
String* sComputerName = pSysInfo->GetComputerNameA();
//Compile error: "...error C2660: 'pkATLSimpleASM::CCATLSimpleClass::GetComputerNameA' : function does not take 1 parameters"
pSysInfo->GetComputerNameA(sComputerName);
}
catch(Exception * e)
{
//.NET dont do HRESULT, return S_OK,E_MYERROR..etc will be packaged into an Exception object.
}
Checking dll with ILDASM,
instance string marshal( bstr) GetComputerNameA() runtime managed internalcall
Compare to source code, it seems tlbimp changes signature of the member function:
STDMETHODIMP CCATLSimple::GetComputerName(BSTR* sComputerName)
{
// TODO: Add your implementation code here
USES_CONVERSION;
if(!sComputerName)
return E_POINTER;
DWORD dwSize = MAX_COMPUTERNAME_LENGTH + 1;
TCHAR sTemp[MAX_COMPUTERNAME_LENGTH +1];
if(!::GetComputerName(sTemp, &dwSize) )
return E_FAIL;
* (sComputerName) = T2BSTR(sTemp);
return S_OK;
}
Now, what if there're more than one [out/retval]? Which one will be treated as "return"?
norm
|
|
|
|
|
norm wrote:
String* sComputerName = pSysInfo->GetComputerNameA();
do this String* sComputerName = pSysInfo->GetComputerNameA;
that should solve that issue
I don't see how you could have more than one. I mean you can only return one value not multiple. If there is one tell me what library its in so I can investigate it.
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
well the return value is 2 things
you must always return an HRESULT because this tells the com service of a pass fail situation which is not used by you but internally.
the retval is what you return like in c#
HRESULT MyProperty( BSTR *pVal )
{
pVAL = TCHAR("dude");
return S_OK;
}
returns dud to your program
return successful to the com service
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
Okay so yeah I should have read a little first.
But,
I need to draw circles in a bitmap, but I want to do values instead.
For instance, instead of an array and storing terrain levels 0 to x number I figured it would be much faster to record a bitmap image the size of the map. Then drawing circles on top and every point that they overlay I would add that value +1.
Any pointers, code examples not required.
Nick
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
Has anybody been working with patterns in C#. I would like some book recommondations?
/Ervar
|
|
|
|
|
hi.
I don't know whether this book is good or not, but recently I came over it (the title) on the web.
"Introduction to Design Patterns in C#"
Copyright © 2002 by James W. Cooper
IBM T J Watson Research Center
February 1, 2002
greetings
andi
|
|
|
|
|
Not that great. Definately not a "God" book.
|
|
|
|
|
Thanks, I'll keep looking...
/Ervar
|
|
|
|
|