小编Mur*_*rat的帖子

将32位COM DLL注册到64位Windows 7

我有一个32位的COM组件DLL,这个DLL是用Delphi编写的.这是一个Win32 DLL.我想在.NET平台上的Visual C#项目中使用此DLL.

我无法在项目中添加对此DLL的引用.我尝试在Windows 7 64位中以管理员身份在命令提示符中注册它,但是我收到此错误:

检查模块是否与regsvr32.exe的x86(32位)或x64(64位)版本兼容.

首先我把DLL文件放到windows/system32文件夹中.然后我以管理员身份打开命令提示符.我编写regsvr32 huginalpha.dll并执行此命令.但是我得到了错误.我能做什么?

com dll windows-7

30
推荐指数
2
解决办法
22万
查看次数

在我的析构函数中释放Excel对象

我正在使用Microsoft.Interropt.Excel DLL编写Excel类.我完成了所有功能,但我的析构函数中有错误.我想将所有更改保存到我的文件中,并且我想要释放所有源代码.我希望所有这些都在我的析构函数中.但在我的析构函数中,Excel.ApplicationClass,Workbook和Worksheet对象由异常填充,其中包含消息"已与其基础RCW分离的COM对象无法使用".所以我不能保存任何东西,什么都不关闭因为ı无法访问工作簿或工作表对象.

我不能在Destructor中访问类私有成员吗?

.net excel destructor release finalizer

8
推荐指数
1
解决办法
2万
查看次数

如何查找System.ExecutionEngineException Exception的源代码

我有一个非常大的应用程序.我的应用程序有时抛出System.ExecutionEngineException,我无法找到此异常的来源.有什么办法找到它吗?

c# exception executionengineexception

6
推荐指数
1
解决办法
3807
查看次数

在Javascript请求后使用Javascript从服务器获取响应

我的Javascript函数请求到aspx页面.İts代码:

 var xhr = ("XMLHttpRequest" in window) ? new XMLHttpRequest() : new ActiveXObject("Msxml3.XMLHTTP");
    xhr.open("GET", = 'http://www.example.net/abc.aspx', true);
    xhr.send(""); 
Run Code Online (Sandbox Code Playgroud)

在此请求之后,我想从此页面发回响应并在客户端捕获它.我怎么做?

javascript response request

5
推荐指数
1
解决办法
5万
查看次数

wglCreateContext()每次在OpenGL和Visual C ++中返回NULL

我是OpenGL的新手。

我想在Windows窗体中使用OpenGL进行一些思考。如果我将Win32应用程序与WinMain方法一起使用,则该应用程序将正常工作。在WinMain方法中,我HWNDCreateWindow()函数和?填充。将WinMain参数提供给CreateWindows

但我想从Windows窗体中获取Handle,我无法获取此信息。每次 wglCreateContext(hdc)NULL 一个例子是我拿

public:
  COpenGL(System::Windows::Forms::Form ^ parentForm, GLsizei iWidth, GLsizei iHeight)
  {
   CreateParams^ cp = gcnew CreateParams;

   // Set the position on the form
   cp->X = 0;
   cp->Y = 0;
   cp->Height = iHeight;
   cp->Width = iWidth;

   // Specify the form as the parent.
   cp->Parent = parentForm->Handle;

   // Create as a child of the specified parent and make OpenGL compliant (no clipping)
   cp->Style = WS_CHILD | …
Run Code Online (Sandbox Code Playgroud)

opengl visual-c++

3
推荐指数
1
解决办法
4843
查看次数

简单的可变参数C函数参数错误

我有一个非常简单的代码.此代码适用于Linux机器.但是当我使用交叉编译构建并在Embbedded Hardware参数上运行时,可变参数函数的值是错误的.它是关于编译(交叉编译)?所有应用程序运行良好但可变功能不起作用.

我的示例代码如下.foo和formatString函数都工作错误.

void foo(char *fmt, ...)
{
    va_list ap;
    int d;
    char c, *s;

    va_start(ap, fmt);
    while (*fmt)
    {
        switch (*fmt++) 
        {
            case 's' :
                s = va_arg(ap, char *);
                printf("string %s\n", s);
                break;
            case 'd' : 
                d = va_arg(ap, int);
                printf("int %d\n", d);
                break;
            case 'c':               
                c = (char) va_arg(ap, int);
                printf("char %c\n", c);
                break;
       }
   va_end(ap);
}

void formatString(char* format, ...)
{
    va_list args;
    char buffer[100];

    va_start(args, format);
    sprintf(buffer, format, args);
    va_end(args);

    printf((char*)buffer);
}

int main(int argc, …
Run Code Online (Sandbox Code Playgroud)

c variadic-functions

2
推荐指数
1
解决办法
329
查看次数