Microsoft MVP성태의 닷넷 이야기
invoke 관련하여... [링크 복사], [링크+제목 복사],
조회: 13234
글쓴 사람
탑 (develtop at empal.com)
홈페이지
첨부 파일
 
부모글 보이기/감추기


string[] gaCert = new string[22];

gaCert[21] = "";

string sKey = "xx";
object gaRsNData=null;
object rsZaa300t=null;


object[] newArgs = new object[6];
newArgs[0] = gaCert;
newArgs[1] = sKey;
newArgs[2] = "";
newArgs[3] = "";
newArgs[4] = gaRsNData;
newArgs[5] = rsZaa300t;


string ModuleName = "";
string TypeName = "";
string MethodName = "";
string FullMethodName = "";

string [] splitted = null;

char [] point = new char[3];
point[0] = '#';

CallingTextBox.Text = "xxxxx.dll#CLogin#Login";

string input = CallingTextBox.Text;

splitted = input.Split(point);

ModuleName = splitted[0];
TypeName = splitted[1];
MethodName = splitted[2];

FullMethodName = "..............";

Assembly myAssembly = Assembly.LoadFrom(FullMethodName);

BindingFlags flags = (BindingFlags.NonPublic | BindingFlags.Public |
BindingFlags.Static | BindingFlags.Instance | BindingFlags.DeclaredOnly);

Module [] myModules = myAssembly.GetModules();
foreach (Module Mo in myModules)
{
if (Mo.Name == ModuleName)
{
Type[] myTypes = Mo.GetTypes();
foreach (Type Ty in myTypes)
{
if (Ty.Name == TypeName)
{
MethodInfo[] myMethodInfo = Ty.GetMethods(flags);
foreach(MethodInfo Mi in myMethodInfo)
{
if (Mi.Name == MethodName)
{
Object obj = Activator.CreateInstance(Ty);
Object response = Mi.Invoke(obj, newArgs);
ResponseLabel.Text = (string)response;
}
}
}
}
}
}




Invoke 관련 하여 만들고 있는데....잘 안되서여.

현재 프로그램과 instance 를 생성하려고 하는 dll 이 같은 폴더에 있으면 생성이 되는데..
다른 폴더에 있으면 생성이 안되더군요...

Object obj = Activator.CreateInstance(Ty); <------- 이부분요

문제는 여러 폴더에 나뒤어져 있는데....다른 폴더의 dll 을 생성할 방법이 없나여?..
이것이 되어야 하는데....조언 좀 부탁 드립니다.

======================================

위의 질문과 관련하여..조언을 받았지만....
해결방법에 대한 개념을 잡지 못하겠네여....

근처에 라도 갈수 있는 길을 좀 알려주시면 고맙겠습니다.
시름시름 앓고 있습니다....흐~흐~흐~~








[최초 등록일: ]
[최종 수정일: 6/22/2006]


비밀번호

댓글 작성자
 




... 46  47  48  49  50  51  52  53  54  55  56  [57]  58  59  60  ...
NoWriterDateCnt.TitleFile(s)
1258최세정4/28/201420632안녕하세요~php module 오류로 고민하다가 여기까지 왔네요..ㅜㅜ [2]
1252popo4/21/201419993바인딩 질문입니다. [2]
1251(non...4/20/201424147(글쓴이의 요청으로 삭제합니다.) [11]
1249홍용규4/17/201424360app.config 파일 관련 질문 있습니다. [2]
1246(non...3/30/201420131(글쓴이의 요청으로 삭제합니다.) [1]
1245POPO3/26/201419499Http 프로토콜 관련 질문 입니다. [1]
1244(non...3/26/201419157(글쓴이의 요청으로 삭제합니다.) [1]
1241(non...3/22/201422522(글쓴이의 요청으로 삭제합니다.) [4]
1240이석주3/21/201425421인터넷 익스플로러가 hang이 걸리는 현상 문의 [1]파일 다운로드1
1238(non...3/13/201419560(글쓴이의 요청으로 삭제합니다.) [2]
1237(non...3/11/201419432(글쓴이의 요청으로 삭제합니다.) [2]
1236(non...3/11/201420314(글쓴이의 요청으로 삭제합니다.) [2]
1235(non...3/10/201418806(글쓴이의 요청으로 삭제합니다.) [2]
1234(non...3/10/201423387(글쓴이의 요청으로 삭제합니다.) [3]
1233(non...3/9/201421124(글쓴이의 요청으로 삭제합니다.) [4]
1232(non...3/8/201419867(글쓴이의 요청으로 삭제합니다.) [2]
1231(non...3/7/201420807(글쓴이의 요청으로 삭제합니다.) [9]
1230POCO3/7/201421211쓰레드 안에서 DependencyProperty get, set시 또 다른 스레드 오류.. [1]
1229(non...3/6/201422463(글쓴이의 요청으로 삭제합니다.) [11]
1228POCO3/6/201420051안녕하세요. 질문이 있습니다. [1]
1226김형진3/4/201430276안녕하세요 windows azure에 관해 질문했던 사람입니다. [2]
1224(non...3/3/201426051(글쓴이의 요청으로 삭제합니다.) [11]
1223sadf...3/3/201420067아래 질문에 답변 감사드립니다. 한가지 더 궁금한점이 있어 질문드립니다. [1]
1222(non...3/2/201420166(글쓴이의 요청으로 삭제합니다.) [4]
1221(non...3/1/201420807(글쓴이의 요청으로 삭제합니다.) [2]
1220Until2/28/201419296질문드립니다. [1]
... 46  47  48  49  50  51  52  53  54  55  56  [57]  58  59  60  ...