473,387 Members | 1,700 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

COM interop help

I'm getting an error when I pass "User" in "report.HasBeenAccesedBy(ref
User,ref UserN);" I have created the iL to see if there is something
incorrect.

..method public hidebysig newslot abstract virtual
instance bool HasBeenAccesedBy([in][out] class LDD.User&
marshal( interface) aUser,
[in][out][opt] string&
marshal( bstr) aUserID) runtime managed internalcall

and is failing in the marshal(interface). but not sure what else to
try. Any help would be appreciated.


LDD.UserRepositoryClass PRC;
PRC = new PRDS_ORAL.UserRepositoryClass();
LDD.UserClass User;
User = (LDD.UserClass)PRC.UserByID(ref UsrID);
LDD.ReportCollectionClass reports;
reports = (LDD.ReportCollectionClass)User.UnaccesedReports(r ef UserN);
for ( int count = 1;count<=reports.Count;count++)
{

LDD.ReportClass report;
report = (LDD.ReportClass)reports.get_ItemByIndex(ref count);
report.HasBeenAccesedBy(ref User,ref UserN);

Nov 17 '05 #1
3 1225
Ed,

If you could tell what the error is, it would help.

I believe that it has to do with your declaration of the User variable.
It should be of type LDD.User (the name of the interface on the class, not
the implementation name). Or, if it is a VB COM dll, then LDD._User.

The UserClass is just the implementation, not the interface, which is
really what is being accessed in COM.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"edmitchell" <ed********@bellsouth.net> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
I'm getting an error when I pass "User" in "report.HasBeenAccesedBy(ref
User,ref UserN);" I have created the iL to see if there is something
incorrect.

.method public hidebysig newslot abstract virtual
instance bool HasBeenAccesedBy([in][out] class LDD.User&
marshal( interface) aUser,
[in][out][opt] string&
marshal( bstr) aUserID) runtime managed internalcall

and is failing in the marshal(interface). but not sure what else to
try. Any help would be appreciated.


LDD.UserRepositoryClass PRC;
PRC = new PRDS_ORAL.UserRepositoryClass();
LDD.UserClass User;
User = (LDD.UserClass)PRC.UserByID(ref UsrID);
LDD.ReportCollectionClass reports;
reports = (LDD.ReportCollectionClass)User.UnaccesedReports(r ef UserN);
for ( int count = 1;count<=reports.Count;count++)
{

LDD.ReportClass report;
report = (LDD.ReportClass)reports.get_ItemByIndex(ref count);
report.HasBeenAccesedBy(ref User,ref UserN);

Nov 17 '05 #2
Sorry the error I get is:

The best overloaded method match for LDD.ReportClass.HasbeenAccedBy(ref
LDD.User, ref string) has someinvalid arguments.

Nov 17 '05 #3
Ed,

Then what I said would be right. If HasbeenAccedBy is looking for a
LDD.User and you are passing in LDD.UserClass, it won't work.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"edmitchell" <ed********@bellsouth.net> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
Sorry the error I get is:

The best overloaded method match for LDD.ReportClass.HasbeenAccedBy(ref
LDD.User, ref string) has someinvalid arguments.

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jack Menendez | last post by:
I have a forms based plugin architecture using C# that includes help files using MSHelpServices. However, my strongly named assemblies cannot be created because Interop.MSHelpServices is not strongly...
1
by: Anand G | last post by:
We are trying to find help on the Interop classes for interfacing with Word/Excel to create Word document with tables/charts etc. We are not able find any help on the MSDN and on google for...
20
by: Razzie | last post by:
Hey all, I'm really going through a small hell right now - I've completely lost it :) I made a project, using two interop libraries from exchange (created them as in this msdn article:...
6
by: Sudha | last post by:
Hi All, I am trying to use COM DLL in my C#. I have added this DLL in referance and all interface are working fine. I have one issue in calling function decleared like: void...
1
by: Shiro | last post by:
Hi I have read the various postings relating to Interop strong name signing and cannot find an example similar to mine. I have stringly named my AxInterops/Interops and they all work just...
7
by: R Reyes | last post by:
Can someone please explain to me why I can't get the MS Word Interop assembly to work in my VS2005 project? I'm trying to manipulate MS Word from my Web Form application and I can't get passed...
0
by: R Reyes | last post by:
ISSUE (reposted) =========================== Can someone please explain to me why I can't get the MS Word Interop assembly to work in my VS2005 project? For many people, they say they add the...
0
by: Tobester | last post by:
Hi I am having problems accessing a vb6 dll from ASP.Net. The vb6 dll is registered. I have then created an interop file using tlbimp. The interop has been added to the GAC. I can run the...
0
by: Tina | last post by:
I've gotten this before where it says there is a problem with Interop.MSDASC but I can't remember what causes this. This is a 1.1 app I'm trying to debug in vs2005. It was running yesterday just...
2
by: RodneyAnonymous | last post by:
I've got some code for composing an e-mail from the contents of an RTF box. The first time I execute it, everything works fine. If I close my app and then re-run it, however, I always receive the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.