|
audio yes, but video no. the type in your Pcommand is mpegvideo , but should a console app be able to play movies? the command succeeded when i tried it with a type waveaudio ..
Also, if you pass a value into mciGetErrorString that is larger than the space that you have allocated for the buffer, then it will be able to write to invalid memory. Since the SB has a capacity of 128 it makes sense to pass in 128 instead of int.MaxValue
good luck
|
|
|
|
|
Yeah, good call on the SB, I just ran into the overflow problem. I made that change. Thanks!
Your right concerning the type also.
The reason I was using the mpegvideo instead of waveaudio was the decoder/codec functions of the mpegvideo option (specifically MP3's) eg. console mp3 player. From what I can tell, I have been unsuccessful in getting waveaudio to use MP3's. I believe it was designed for raw WAV's only.
I was hoping to stick with winmm.dll for the consistency. Any suggested workarounds? Time for a new lib?
Thanks again for all of the help.
|
|
|
|
|
|
Thanks for the links.
It looks like the MCI open string doesn't work the way I want it to, but by using the play command, and never even using the open command, it works... shrug.
Another person was having the same issue at the bottom of this page...
http://gmc.yoyogames.com/lofiversion/index.php/t743.html[^]
I'll check out those links you provided me too. Thanks again!!
|
|
|
|
|
Jimmanuel is right on the money....
You need to use the appropriate types to interop.
DWORDs will never be a C# long - they are always unsigned 32-bit ints.
A BOOL is an int, which is a 32-bit signed int.
As Jimmanuel mentioned, you also can't use a string as an out parameter like that.
Put that all together and something like this should work:
[System.Runtime.InteropServices.DllImport("winmm.dll")]
private static extern int mciGetErrorString(UInt32 errorCode, StringBuilder buffer, UInt32 iReturnLength);
I tested this with the following code and it worked:
StringBuilder sb = new StringBuilder(260);
mciGetErrorString(256+37, sb, 260);
Console.WriteLine(sb.ToString());
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi
i want to trace my application to get information how much memory allocate to each objects and ...
does visual studio has this tool ? (i don't implement this by code, i want to trace my app visually)
how to do ?
thanks
|
|
|
|
|
I want to display doc file in my C# Application
how can I do it?
Do you have any viewer about it
Thanks in advance
Hello Friends
|
|
|
|
|
You can do this through VSTO or other third party software.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
You can use the Office Interop Library, but that is going to require your users to have Office installed.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Microsoft Office Word Viewer 2003 lets you view and print Word documents on a computer that does not have Word installed. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
889347 (http://support.microsoft.com/kb/889347/) Description of the Microsoft Office Word Viewer 2003
Vikas Amin
UNITED STATES STEEL CORPORATION
My First Article on CP" Virtual Serial Port "[^]
modified on Thursday, July 24, 2008 5:33 PM
|
|
|
|
|
many but not all doc files open without any issue with WORDPAD
Vikas Amin
UNITED STATES STEEL CORPORATION
My First Article on CP" Virtual Serial Port "[^]
modified on Thursday, July 24, 2008 5:33 PM
|
|
|
|
|
|
|
ahaa, I found the problem. If the html source has a big VIEWSTATE, it doesn't respond.
when I put spaces somewhere in the big viewstate regex was responded.
Now I'm removing all viewstates's values
It's working perfect
I want to fly but I don't have wings
modified on Wednesday, August 6, 2008 12:55 PM
|
|
|
|
|
I see. I believe that it's the "\S+-image" part that is making it slow.
The \S+ will match the entire viewstate value, but then it will not find "-image" at the end of it, so it will start going back through the viewstate character by character looking for "-image".
Use som reasonable limit like \S{1,20} and it should be much faster.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hey,
How would one load a form in the background? I have a couple of complex forms that take some time to load on .net compact framework.
|
|
|
|
|
If the compact framework has it, you could use a backgroundworker and return the form(s) in the result property.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
If the compact framework has it, you could use a backgroundworker and return the form(s) in the result property.
If it hasn't, you can do the same without the backgroundworker by using the Thread class (which the compact framework definitely has).
But you won't have much fun with a form created that way. It's handle will have been created by a thread that has terminated when you get the form, so you can hardly do anything with it.
|
|
|
|
|
Hi,
I need to automate a web application. For this I am using C#.net and a Libary called "WatIn" whose reference I got from article on this site.
Using this it is simple to automate the general web applications. But My problem is different.
The Web Page is of course not developed by me but its source code(javascript) I have access to them.The application containes Combobuttons. I am able to access those buttons but the only problem is that when I click on any of the combo button it launches a web-dialog. But what I need to do is to expand the ComboButton and make a choice from them so that appropriate dialog box gets launched.
Also the combo buttons are arranged just as "Help", "Links", etc links are on this site, the only difference being that I can identify all the menu items under Help using Internet Explorer Deloper toolbar..
Can anybody out there help me in accessing those elements which are not identified by the Internet Explorer Developer toolbar.
Please Help. Thanks in advance.
Purusottam Mishra
Systems Executive
|
|
|
|
|
Hi all,
I want a customized treeview where i want checkbox in a haphazard manner for eg. sometime i want to add checkbox in both parent and child node, and sometimes only in child node. for that i am trying to override the TreeNode class,so that i can add that class object(node) when i need a node with checkbox else the default TreeNode object(for this node.DrawDefault = false) but not getting any clue. Can somebody plz help me out.
Thanks in advance
sanjeev
|
|
|
|
|
I'm sure you can already do that with the current TreeView.
|
|
|
|
|
please give me some clue so that i can proceed
|
|
|
|
|
Well the TreeView has the Property ShowCheckBoxes /none/Leaf/Parent/Node/All
Would this work fine.
|
|
|
|
|
hi,
I am working on site Builder Application,I used HtmlEventProxy Class
to attache Event ,but when i run exe i get this error (unable to cast object of type 'System.Windows.Forms.Button' to type 'HtmlEventsSmple.HtmlEventproxy'), i dont know how to solve this problem , please help me .
thanks
Wafy
|
|
|
|
|
HI,
How to read a html file with images using c# and send mail with the contents of html including images in the body of the mail?
Thanks in advance
|
|
|
|