Click here to Skip to main content
15,899,314 members
Home / Discussions / C#
   

C#

 
GeneralRe: Which Row/Col When Mouse Hovers/Moves over DataGrid? Please! Pin
Khang Nguyen16-Sep-04 12:23
Khang Nguyen16-Sep-04 12:23 
GeneralRe: Which Row/Col When Mouse Hovers/Moves over DataGrid? Please! Pin
Heath Stewart16-Sep-04 13:15
protectorHeath Stewart16-Sep-04 13:15 
GeneralRe: Which Row/Col When Mouse Hovers/Moves over DataGrid? Please! Pin
Khang Nguyen16-Sep-04 13:26
Khang Nguyen16-Sep-04 13:26 
GeneralRe: Error with file I/O in C# Pin
Grimolfr16-Sep-04 6:27
Grimolfr16-Sep-04 6:27 
GeneralSave project Pin
ee9903516-Sep-04 4:15
ee9903516-Sep-04 4:15 
GeneralRe: Save project Pin
sreejith ss nair16-Sep-04 17:29
sreejith ss nair16-Sep-04 17:29 
GeneralRe: Save project Pin
ee9903517-Sep-04 0:05
ee9903517-Sep-04 0:05 
GeneralReflection problem Pin
Ananth RK16-Sep-04 3:47
Ananth RK16-Sep-04 3:47 
Hello group,

Here is the scenario...

There is a .dll (written in C#) available in the same folder as my application.I'm using reflection to dynamically load the assembly and call the methods available in that dll.

However, the system hangs when it is trying to call the methods in that dll. FYI, i'm able to successfully create an object for the dll's class. The problem is in the line i call the "Invoke" method. That is, the control is NOT passing to the next line after "Invoke" and it remains in the same line for an infinite amount of time. I've attached the method (at the end of this post) for your reference.

Any suggestions would be greatly appreciated.

Thanx,
Ananth

------------------------------------------------------------------------------
//Method starts here
private string CallFunction(string assemblyPath, string className, string methodName, string[] param)
{
try
{
if (! System.IO.File.Exists(System.Windows.Forms.Application.StartupPath + "\\" + assemblyPath))
{
return "The dll is not found in the installation directory.";
}
else
{
assemblyPath = System.Windows.Forms.Application.StartupPath + "\\" + assemblyPath;
}

Assembly objAssembly = Assembly.LoadFrom(assemblyPath);

if (objAssembly == null)
return "";

AssemblyName objAssemblyName = objAssembly.GetName();
string strAssemblyShortName = "" + objAssemblyName.Name;
objAssemblyName = null;
Type objType = objAssembly.GetType(strAssemblyShortName + "." + className);

object o = Activator.CreateInstance(objType);

int ct = param.Length;
object[] paramObj = new object[ct];

for (int i=0;i
GeneralRe: Reflection problem Pin
leppie16-Sep-04 3:53
leppie16-Sep-04 3:53 
GeneralRe: Reflection problem Pin
Ananth RK16-Sep-04 4:24
Ananth RK16-Sep-04 4:24 
GeneralRe: Reflection problem Pin
Heath Stewart16-Sep-04 6:34
protectorHeath Stewart16-Sep-04 6:34 
GeneralRe: Reflection problem Pin
Ananth RK16-Sep-04 8:05
Ananth RK16-Sep-04 8:05 
GeneralRe: Reflection problem Pin
Heath Stewart16-Sep-04 9:24
protectorHeath Stewart16-Sep-04 9:24 
Generalabout xml: Pin
skywen16-Sep-04 3:41
skywen16-Sep-04 3:41 
GeneralRe: about xml: Pin
Heath Stewart16-Sep-04 6:26
protectorHeath Stewart16-Sep-04 6:26 
GeneralAuthority problem, I guess... Pin
mcgahanfl16-Sep-04 2:40
mcgahanfl16-Sep-04 2:40 
GeneralRe: Authority problem, I guess... Pin
Stefan Troschuetz16-Sep-04 3:40
Stefan Troschuetz16-Sep-04 3:40 
GeneralRe: Authority problem, I guess... Pin
leppie16-Sep-04 3:41
leppie16-Sep-04 3:41 
GeneralRe: Authority problem, I guess... Pin
Steven Campbell16-Sep-04 6:22
Steven Campbell16-Sep-04 6:22 
GeneralRe: Authority problem, I guess... Pin
Heath Stewart16-Sep-04 6:37
protectorHeath Stewart16-Sep-04 6:37 
GeneralRe: Authority problem, I guess... Pin
Heath Stewart16-Sep-04 6:57
protectorHeath Stewart16-Sep-04 6:57 
GeneralSimple Problem with listview Pin
brunoconde16-Sep-04 2:20
brunoconde16-Sep-04 2:20 
GeneralRe: Simple Problem with listview Pin
sreejith ss nair16-Sep-04 2:39
sreejith ss nair16-Sep-04 2:39 
GeneralDatagrid form steals focus Pin
the last free name16-Sep-04 1:45
the last free name16-Sep-04 1:45 
GeneralRe: Datagrid form steals focus Pin
sreejith ss nair16-Sep-04 2:31
sreejith ss nair16-Sep-04 2:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.