|
Hi,
Have a little trouble passing a byte array in C# into a C++ implemented web service, the C# code is:-
FileStream fs = new FileStream("c:\\work\\temp\\Waremouse.mp3", FileMode.Open);
BinaryReader Reader = new BinaryReader(fs);
Reader.BaseStream.Seek(0, SeekOrigin.Begin);
long lLength = Reader.BaseStream.Length;
Int32 nLength = System.Convert.ToInt32(lLength);
byte[] bData = Reader.ReadBytes(nLength);
fs.Close();
//**********************************************
//C++ Web Service.......
m_FileServer.UploadFile("Waremouse.mp3", bData);
//**********************************************
The C++ is implement as COM interface as shown below
__interface IFBFileServerService
{
//Uploads a file onto the web server....
[id(1)] HRESULT UploadFile([in] BSTR bstrFileName, [in] byte* bData);
//Downloads a file from the web server...
[id(2)] HRESULT DownloadFile([in] BSTR bstrFileName, [out, retval] byte** bData);
};
The problem is that an exception is thrown in the client application
Cheers for any help
|
|
|
|
|
i download the "screen saver"(screensaver_JTJ.csproj);
and i wonder why it can download the codeproject.com's latest posts.it's code may be like this:
codeProject.LatestBrief latest = new codeProject.LatestBrief();
int nInterval = latest.GetArticleLatestUpdatePeriod();
arArticles.Clear();
codeProject.ArticleBrief[]articles=latest.GetLatestArticleBrief(latest.GetMaxArticleListLength());
TextActor a;
int nText = nTextPos;
Point velocity = new Point(0, -3);
if (null != articles)
foreach (codeProject.ArticleBrief article in articles)
{
if (article != null)
{
a = new TextActor(article.Title);
......
and it has a latest.wsdl file which i think related to it.
i want to know how to do that?i mean if i have a website like codeproject.com,how can i download such things?
any documents or articles that relate to that topic?
thanks in advance!
|
|
|
|
|
See this article!
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Sorry, I was too hasty in posting my reply. You'd have to convert my MFC code to C#.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Someone meet this MFC guy and tell him not to talk MFC in a C# forum
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
He's probably just trying to raise his post count.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
i will read that carefully!
then i will ask more questions maybe!
|
|
|
|
|
I have a C# form UI and I would like to create a web page from that. Anybody knows how to do that?
Thanks
Al
|
|
|
|
|
I am using a OCX component that call a event .. I never make programs using C# .. how can I use Events ?
|
|
|
|
|
how do i declare a dynamic byte array?
|
|
|
|
|
int size = 100; // dynamic size
byte[] b = new byte[size];
for ( int i=0; i
|
|
|
|
|
If you're using MFC, use CByteArray .
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Ravi Bhavnani wrote:
If you're using MFC, use CByteArray.
Don't think he'd be using MFC, now that he has asked this question in the C# forum.
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Argh! I did it again.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
I have a file that an old program is changing
I want to build a service or something like it to listen to
That file and raise an event (my program) every time it is
Changing
Thanks
|
|
|
|
|
look at the documentation of System.IO.FileSystemWatcher
|
|
|
|
|
See this article.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Can any of you recommend a good C#-book? I've bought the "Programming C#" by Jesse Liberty, and it's quite good. But there's nothing about GDI+, and since I'm mainly interested in image analysis/processing and graphics I'd like to buy a book which contains some stuff about GDI+ and possibly also about Winforms. I've thought about the WROX Proffesional C# Programming, anybody read that?
|
|
|
|
|
Programming Windows with C# by Petzold ? This discuss Winforms , UI stuff and GDI+ ...
BTW , a C# is different of GDI+ , by your title I thought that you wanted a C# book like Inside C# by Tom Archer instead of a GDI+ book .
The Petzold book is quite good explaining all the UI and GDI+ stuff , but if you are interested in Image processing you better get a specif book about this, since I currently don't known any book that deals with it with C#, C++ and C are the common language used in kind of image processing algorithm books.
Cheers,
Joao Vaz
Addicted C++ programmer
|
|
|
|
|
I'll second this book. Loads of good information on a variety of Windows topics.
|
|
|
|
|
Rohde wrote:
I've thought about the WROX Proffesional C# Programming, anybody read that?
It has only one chapter about GDI+,and you can read that chapter here.
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
Petzold is definately the book on GDI+. As for image processing, some clown has written a few articles on doing that in C# right here on CP. I hear he's an idiot, but there might be some stuff in there worth investigating all the same. :P
Why do you want to do image processing in C# ?
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
Let me guess? You're the sinister person behind those articles? I'll check 'em out.
There's actually no particular reason why I'm want to do it in C#. It´'s mostly because it's a fun way of getting to use and learn C# since I find image processing interesting and great fun.
|
|
|
|
|
Rohde wrote:
´'s mostly because it's a fun way of getting to use and learn C# since I find image processing interesting and great fun.
That's pretty much exactly why I wrote my first C# articles on image processing also )
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
Can anybody tell me what caused this error?
Assembly generation failed -- Referenced assembly 'Mazdak.WebModules.Accounts.Data' does not have a strong name
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|