excel-dna 프로젝트를 알고 계시는지 모르겠다. Excel 어셈블리를 Excel 통합에 도움이되는 프로젝트입니다.Excel-DNA로 작성된 Excel .XLL 파일의 내용 압축 해제
내 문제는 xll 파일 (excel-dna가 xll 내부의 리소스를 압축 할 수 있음)에서 dll을 압축 해제하려고합니다.
나는 엑셀-DNA 소스를 donwloaded 이미 소스 코드에이 기본 쓰기 :string xlllib = @"C:\pathtomyxllfile\myaddin.xll";
string xlloutput = @"C:\pathtomyxllfile\myaddin.dll";
var hModule = ResourceHelper.LoadLibrary(xlllib);
var content = ResourceHelper.LoadResourceBytes(hModule, "ASSEMBLY_LZMA", "MYASSEMBLYNAME");
using (BinaryWriter binWriter = new BinaryWriter(File.Open(xlloutput, FileMode.Create)))
{
binWriter.Write(content);
}
을했지만 작동하지 않습니다. 누구나 xll에서 dll을 압축 해제 할 생각이 있습니까? 사전에
덕분에,
로 포장 ExcelDna 추가 기능의 내용을 추출하는 명령 줄 유틸리티입니다. 작동하지 않는 것은 무엇입니까? 내용 바이트 배열이 비어 있습니까? hModule은 0입니까? 예외가 있습니까? – Hans
예, 문제는 hModule 포인터를 가져올 수 없다는 것입니다. Kernel32의 LoadLibrary는 0을 반환합니다. 나는 GetModuleHandle로 시도했지만 그와 동일하다. – Dragouf
excel dna 소스 프로젝트에서 AssemblyManager.cs에서 LoadResourceBytes를 찾을 수 있습니다 (http://exceldna.codeplex.com/SourceControl/changeset/view/67101#209445). XLL 파일 내의 Dll은 ExcelDnaPAck 프로젝트로 압축되었습니다. – Dragouf