|
OK - well, even if you find some harder way of doing things, it's still not going to work without the DVD codecs installed.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
yeh i have the codecs
i was using:
Imports MSVidCtlLib
and than
Dim WithEvents dvdjunk As MSVidWebDVD = Nothing
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
dvdjunk = New MSVidWebDVD
dvdjunk.Run()
End Sub
and i keep getting "The method or operation is not implemented."
than if i use
Imports MSWEBDVDlib
amd
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
dvdstuff = New MSWebDVD
dvdstuff.Play()
End Sub
than i get
COMException unhandled
The data necessary to complete this operation is not yet available.
so im not sure what im missing or what im not implementing ("The method or operation is not implemented.")
??
thanks for the help though so far, i appreciate it
|
|
|
|
|
You're not using Vista are you ? The docs say this is available on W2000, XP and S2003, but says it could be removed in the future ( unlike windows media player )
http://msdn2.microsoft.com/en-us/library/ms787412.aspx[^]
I don't see a run method in the docs. I see 'play'.
The name implies this is designed for use in web apps, not windows apps. Why won't you use WMP ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
if i use WMP will WMP need to be installed on the machine?
|
|
|
|
|
Yes, but isn't it always ?
This isn't going to work for anything prior to W2000, and if it works for Vista, there's no guarentee it will work after that. I am certain that W2000, XP and Vista come with WMP installed.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
its a "high school certificate" software project i'm working on and it's meant to show a little more difficulty than just using windows media player
hence using the MSVidCtlLib
so if all it is is using the WMP it wouldnt really go along the lines of how im meant to be building it, so its not me being picky its me trying to get good marks so i dont fail
|
|
|
|
|
OK - I'm not sure if managed directX will play DVDs, but either way, you're going to tell a component to play video for you. Really, you're not going to write a player, you're writing a wrapper for an existing player. If I was marking you, I'd mark you down for doing things the hard way ( which is never smart ). You'd do better to think of ways you can add functionality that is unique to your player ( or at least involves you writing some code that doesn't just call a built in component ).
The docs look to me like this component has an interface very similar to the WMP interface, once you get it working, it will wrap playing a dvd, just like WMP does.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
id probably get marked down for doing it the WMP way aswell, he expects a bit from me, he looks at our programming skills sort of than says yes or no to the project that we choose.
seeing as it may be to difficult or not difficult enough do you know of some sort of project i could do?
it can be anything really from a game to a whatever, we have 8 weeks i think and it needs full documentation, the dvd player was my only idea, ity also has to be ethical, so an mp3 player wouldnt be for instance (because mp3's are technically illegal in a way)
thanks for all the help by the way, id been researching all day and just getting errors, i did actually tho get the sound playing from the dvd and that was it, it somehow leaked, but im not sure how i did that because i didnt notice than i changed the code
|
|
|
|
|
Its_Me_Lenny wrote: id probably get marked down for doing it the WMP way aswell, he expects a bit from me, he looks at our programming skills sort of than says yes or no to the project that we choose.
The mark of a good programmer (or software developer) is that he/she uses the right tool for the right job (when available - and campaigns for it when not)
Personally, if I were doing your project I'd be using the Windows Media Player and I've been programming for almost 22 years now.
Its_Me_Lenny wrote: it can be anything really from a game to a whatever, we have 8 weeks i think and it needs full documentation
Then write a game. It would be a much better demonstration of your skills that wrapping an existing component with a few buttons - which is really what you are doing.
Go for something like noughts-and-crosses (Tic-Tac-Toe in some locales) or even SoDuKu.
Its_Me_Lenny wrote: because mp3's are technically illegal
WTF? No they are not. Only if they contain copyrighted content and you don't have the rights to that content! You can download something like Dot Net Rocks[^] as an MP3. That is not illegal.
Where on Earth did you get the idea that "MP3s are technically illegal"?
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton
My website
|
|
|
|
|
Christian Graus wrote: I am certain that W2000, XP and Vista come with WMP installed.
Except in Europe for Win XP N and Win Vista N, courtesy of the EU. But I've yet to encounter anyone who owns such versions!
Kevin
|
|
|
|
|
Kevin McFarlane wrote: Except in Europe
Or in South Korea where there are Win XP K, etc. editions.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton
My website
|
|
|
|
|
Ah yes, did that actually go ahead then?
Kevin
|
|
|
|
|
Kevin McFarlane wrote: Ah yes, did that actually go ahead then?
According to my MSDN Subscription as I can download them. Not sure why I'd want to download crippled versions of Windows, but it is there all the same.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
* Reading: Developer Day 5
Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton
My website
|
|
|
|
|
Colin Angus Mackay wrote: Not sure why I'd want to download crippled versions of Windows, but it is there all the same.
Because bureaucrats feel we should have the choice!
Kevin
|
|
|
|
|
also take note that one was the mswebdvd the other was MSVidCtlLib which uses msvidwebdvd theres the extra vid bit in it
it also uses the direct show
|
|
|
|
|
I am fed up with having to stamp everything i print at work with the "COPY" stamp. I have been thinking about this for while now and i cant figure it out.
I would like to write a program that will append a little "CC" carbon copy image at the bottom of everything i print. Does anybody have any ideas? This seems like it would be beneficial to a lot of people has anyone heard of something like this before being done?
Any kind of help is appreciated.
Thanks a lot
Cory
|
|
|
|
|
This is already done in the HP printer drivers, called watermarking.
Other than that, you will find this a very difficult task if you wanted to append this yourself using a kind of print monitor.
|
|
|
|
|
Hello all, I am working with VB.Net going to an Access database. I am working with the version of Crystal that ships with VS.Net 2005 and I am trying to design a report. I have an MR number as the grouping (because I have it in all of my tables that I read). But when I preview it from within Crystal (not running my code) I get mutiple copies of the same record showing on the page.
Does anyone have any idea what could cause this? Thanks for an input you can give me!!
|
|
|
|
|
Multiple copies of the same record in the report would mean that your SQL queries are returning those multiple copies because of some flaw in your SQL or table design.
Without seeing your table design and relationships and you SQL, it's impossible to tell you where else to look.
|
|
|
|
|
Thanks Dave, I mean to come post out here the I found the problem. It was with the linking of the tables. There must have been something wrong becaue I removed the links and then recreated the exact same links and this time it works. I am sure I had something wrong with them but I still don't know what it was. Thanks for you reply!!! You are always a great help!
|
|
|
|
|
|
Hi, I get the following error message when I run my application in the browser.
"Invalid cast from System.String to System.Byte[ ]"
I have changed cmdInsert.Parameters.Add("@docContent",OdbcType.Text) to cmdInsert.Parameters. Add("@docContent",OdbcType.Binary) like someone had suggested, but it still does not work. I have checked other variables for type mismatch but didn't find any. If you see anything at all wrong with my code please point it out. I would really be grateful if you can show me what is causing VS2003 to throw the exception. Thank you in advance for your help. The following are my code and database to help you better understand my situation.
---------------------------------------------------------------------------------------------
| Field | Type | Null | Key |default | Extra |
--------------------------------------------------------------------------------------------------
| docID | int(11) | NO | PRI | NULL | AUTO_INCREMENT |
|
| docTitle | varchar(30) | NO | | NULL | |
|
| docContent | MediumBlob | NO | | NULL | |
|
| docDate | timestamp | NO | | CURRENT_TIMESTAMP | |
|
| docType | varchar(15) | NO | | NULL | |
----------------------------------------------------------------------------------------------------
Imports System.IO
Imports System.Data.Odbc
Public Class Upload
Inherits System.Web.UI.Page
Private Sub Submit1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Submit1.Click
Dim strFileExtension As String
Dim StrFileType As String
Dim intFileLen As Integer
Dim objStream As Stream
Dim strInsert As String
Dim myConnection As OdbcConnection
Dim cmdInsert As OdbcCommand
If Not IsNothing(txtFileContents.PostedFile) Then
'Determines File Type
strFileExtension = Right(txtFileContents.PostedFile.FileName, 4)
Select Case strFileExtension.ToLower
Case ".doc"
StrFileType = "doc"
Case ".ppt"
StrFileType = "ppt"
Case ".htm"
StrFileType = "htm"
Case ".html"
StrFileType = "html"
Case ".txt"
StrFileType = "txt"
Case Else
StrFileType = "jpg"
End Select
'Grab the content of uploaded file
intFileLen = txtFileContents.PostedFile.ContentLength
Dim arrFile(intFileLen) As Byte
objStream = txtFileContents.PostedFile.InputStream
objStream.Read(arrFile, 0, intFileLen)
'Add UpLoaded file to a database
myConnection = New OdbcConnection("Provider=MySQLProv; Data Source=Data;User Id=myIDassword=myPWD")
strInsert = "INSERT into QUsers (docTitle,docContent,docDate,docType) values (?,?,?,?,?)"
cmdInsert = new odbcCommand(strInsert,myConnection)
cmdInsert.Parameters.Add("@docID",OdbcType.int,30)
cmdInsert.Parameters["@docID"].Values =""
cmdInsert.Parameters.Add("@docDate", OdbcType.TimeStame,14)
cmdInsert.Parameters["@docDate"].Values = DateTime.Now.ToShortDateString()
cmdInsert.Parameters.Add("@docTitle", OdbcType.Varchar,30 )
cmdInsert.Parameters["@docTitle"].Values = txtFileTitle.Text
cmdInsert.Parameters.Add("@docType", OdbcType.Varchar,30)
cmdInsert.Parameters["@docType"].Values =StrFileType
cmdInsert.Parameters.Add("@docContent",OdbcType.Binary)
cmdInsert.Parameters["@docContent"].Values =arrFile
myConnection.Open()
cmdInsert.ExecuteNonQuery()
myConnection.Close()
End If
-- modified at 15:16 Friday 8th June, 2007
|
|
|
|
|
On what line does this exception show up?
|
|
|
|
|
It shows up on line 92 where it says cmdInsert.ExecuteNonQuery(). Thank you so much for responding. I just don't know what else to do.
|
|
|
|
|
OK, this usually means you have mismatched one of your parameters. But, the code sample that you gave is NOT what you have running. This code wouldn't even compile, let alone run! Next time, COPY AND PASTE your code, do NOT retype what you THINK it is! How can I tell? The property name is Value , not "Values".
cmdInsert.Parameters.Add("@docID",OdbcType.int,30)
cmdInsert.Parameters["@docID"].Values =""
cmdInsert.Parameters.Add("@docDate", OdbcType.TimeStame,14)
cmdInsert.Parameters["@docDate"].Values = DateTime.Now.ToShortDateString()
cmdInsert.Parameters.Add("@docTitle", OdbcType.Varchar,30 )
cmdInsert.Parameters["@docTitle"].Values = txtFileTitle.Text
cmdInsert.Parameters.Add("@docType", OdbcType.Varchar,30)
cmdInsert.Parameters["@docType"].Values =StrFileType
cmdInsert.Parameters.Add("@docContent",OdbcType.Binary)
cmdInsert.Parameters["@docContent"].Values =arrFile
I can see several problems with creating the parameter objects. In the overload of Add that you're using, you're supplying a parameter name, an ODBCType, and a size for that type. You do NOT have to specify a size for basic types like ODBCType.Int because the size is always constant. For Text and Binary types, you do specify a size. So, changing the code a bit:
' Int's are always 4 bytes long, not 30.
cmdInsert.Parameters.Add("@docID",OdbcType.int).Value = String.Empty
' This is where your error occured. You used the TimeStamp type instead of
' Date. TimeStamp requires an array of bytes and you supplied a string of characters.
cmdInsert.Parameters.Add("@docDate", OdbcType.Date).Value = DateTime.Now
' This is a disaster waiting to happen! You don't do any validation of user input
' before you plug what the user typed directly into an SQL parmater! VERY BAD IDEA!
cmdInsert.Parameters.Add("@docTitle", OdbcType.Varchar, 30).Value = txtFileTitle.Text
' So far, this one looks good. Assuming, of course, that 30 is the
' actual size of the field in your database!
cmdInsert.Parameters.Add("@docType", OdbcType.Varchar, 30).Value = StrFileType
' I'd be willing to bet that this OdbcType doesn't match the field type in your database.
cmdInsert.Parameters.Add("@docContent",OdbcType.Binary, size is missing!).Value = arrFile
|
|
|
|
|