I have built an application in C# and also built a setup for this application. The application on setup works on all Windows 7 machines but doesnt seem to work on any XP machine.
I shall briefly describe what my application does.
The application plays a swf file on startup. The swf file has 3 buttons with separate functions. Basically on clicking these buttons it has to show certain images which are loaded from sqlite.
The problem is that the application loads the swf correctly, the swf plays completely till the end, then at the end where i have placed 3 buttons the click event does not respond to any button. i am guessing this is a problem with FSCommand and the dlls not getting registered correctly
The dlls that i have added to my setup are
- AxInterop.ShockwaveFlashObjects.dll
- Interop.shockwaveFlashObjects.dll
- System.Data.SQLite.dll
- KP-ImageViewerV2.dll (from codeproject.com)
Also the files present are my manifest file and .config file
I tried registering my Dlls manually using RegSrv32 C:\Interop.ShockwaveFlashObject.dll and also C:\AxInterop.ShockwaveFlashObject.dll The error i get is
The (DllPath and Name Here) was loaded but DllRegisterServer entry point was not found.
The code that i am using to display my swf file is as below
private void axShockwaveFlash1_FSCommand(object sender,AxShockwaveFlashObjects._IShockwaveFlashEvents_FSCommandEvent e)
{
string btn = e.command.ToString();
if (btn == "play")
{
try
{
frmMain Main = new frmMain();
Main.Show();
this.Hide();
}
catch (Exception ex)
{ MessageBox.Show(ex.ToString()); }
}
if (btn == "syllabus")
{
SQLiteConnectionStringBuilder strbldr = new SQLiteConnectionStringBuilder();
strbldr.DataSource = @Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\TVC E-Excust Customs\\E-ExcustCustoms.s3db";
SQLiteConnection con = new SQLiteConnection(strbldr.ConnectionString);
con.Open();
Syllabus_usageInformation syl = new Syllabus_usageInformation(this);
SQLiteCommand cmd = new SQLiteCommand("SELECT ImageFiles FROM misc WHERE Name='Syllabus new'", con);
SQLiteDataReader reader = cmd.ExecuteReader();
byte[] imageBytes = null;
while (reader.Read())
{
imageBytes = (System.Byte[])reader["ImageFiles"];
}
MemoryStream ms = new MemoryStream(imageBytes, 0, imageBytes.Length);
con.Close();
syl.kpImageViewer1.OpenButton = false;
syl.kpImageViewer1.Image = (Bitmap)Image.FromStream(ms,true);
syl.kpImageViewer1.Zoom = 85;
syl.Show();
this.Hide();
}
if (btn == "usageInformation")
{
SQLiteConnectionStringBuilder strbldr = new SQLiteConnectionStringBuilder();
strbldr.DataSource = @Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\TVC E-Excust Customs\\E-ExcustCustoms.s3db";
SQLiteConnection con = new SQLiteConnection(strbldr.ConnectionString);
con.Open();
Syllabus_usageInformation syl = new Syllabus_usageInformation(this);
SQLiteCommand cmd = new SQLiteCommand("SELECT ImageFiles FROM misc WHERE Name='UsageInformation'", con);
SQLiteDataReader reader = cmd.ExecuteReader();
开发者_如何学JAVA byte[] imageBytes = null;
while (reader.Read())
{
imageBytes = (System.Byte[])reader["ImageFiles"];
}
MemoryStream ms = new MemoryStream(imageBytes, 0, imageBytes.Length);
con.Close();
syl.kpImageViewer1.OpenButton = false;
syl.kpImageViewer1.Image = (Bitmap)Image.FromStream(ms, true);
syl.kpImageViewer1.Zoom = 82;
syl.Show();
this.Hide();
}
}
My swf file has three buttons as mentioned above. those buttons are in a movie clip i shall paste the AS code as well Here is what happens in one of the buttons. The remaining 2 are same as this one with just the values changed. I am pretty new to flash but could this problem be because of the AS version used / or the minimum version of flash being required to run this swf. Just a mention again the video plays but the buttons are non responsive on XP but works on 7?
on (rollOver)
{
if (_root.link != page)
{
this.gotoAndPlay("s1");
}
}
on (releaseOutside, rollOut)
{
if (_root.link != page)
{
this.gotoAndPlay("s2");
}
}
on (press)
{
fscommand("syllabus","syll");
}
If some one needs more explanation or more code or just the entire project let me know will send the project. I am out of solutions here so any help would be highly appreciated.
Alright PROBLEM SOLVED..there is some problem with .net 4.0. I found this because i searched something on google for my problem, i dont remember the search i did but it returned 2 results!! one of which had a conversation, some VS guy and a user were talking about the problem he faced which was similar to mine. the VS guy agreed that indeed the problem was with 4.0 and that they will rectify the problem. Seems i wasted a lot of time.
精彩评论