Powerbuilder ORCA API 部署

发布于 2024-12-27 01:38:41 字数 1970 浏览 1 评论 0原文

我正在尝试使用 orca api 将我的 powerbuilder 项目部署到 EAServer。但我收到错误-21 PBORCA_CBBUILDERROR(部署因错误而失败)。此外,回调函数(BuildErrProc)没有被调用。我怎样才能克服这个问题?顺便说一句,我使用的是 WindowsXP-32bit、Powerbuilder 11.2、EAServer 5.5、QT-4.8.0 开源 vs2010。

void __stdcall BuildErrProc(LPVOID lpUserData) {
  PPBORCA_BLDERR blderr = (PPBORCA_BLDERR)lpUserData;
  QString s;
  s = QString::fromStdWString(blderr->lpszMessageText);
  QMessageBox::information(0,"",s);
}

int WINAPI BuildProject(QString currentApplLibName,QString currentApplName,QString projectLibName,QString projectName,QStringList libraryNames)
{
  PBORCA_BLDPROC fpBuildErrProc;
  PPBORCA_BLDERR pBldErrData;
  fpBuildErrProc = (PBORCA_BLDPROC) BuildErrProc;
  pBldErrData = (PPBORCA_BLDERR) new PBORCA_BLDERR;
  memset(pBldErrData, 0x00, sizeof(PBORCA_BLDERR));

  HPBORCA hORCASession;
  hORCASession = SessionOpen();
  printf("Setting library list..\n");    
  LPTSTR* pLibNames = new LPTSTR[libraryNames.size()];
  for(int i=0;i<libraryNames.size();i++) {
      pLibNames[i]=(LPTSTR)libraryNames.at(i).utf16();
  }
  int r = PBORCA_SessionSetLibraryList(hORCASession, pLibNames, libraryNames.size());
  if(r==0) {
      printf("Library list OK.\n");
      QMessageBox::information(0,"",currentApplName);
      r = PBORCA_SessionSetCurrentAppl(hORCASession,(LPTSTR)currentApplLibName.utf16(),(LPTSTR)currentApplName.utf16());
      if(r==0) {
          printf("Setting current appl OK.\n");         
          r = PBORCA_BuildProject(hORCASession,(LPTSTR)projectLibName.utf16(),(LPTSTR)projectName.utf16(),fpBuildErrProc,pBldErrData);
          if (r==0) {
              printf("Building current prj OK.\n");
          } else {
              printf("Build FAILURE:%d\n",r);
          }
      } else {
          printf("Current appl FAILURE.\n");
      }
  } else {
      printf("Library list FAILURE:%d\n",r);
  }
  SessionClose(hORCASession);
  return r;
}

I am trying to deploy my powerbuilder project to EAServer with orca api. But I am gettiing error -21 PBORCA_CBBUILDERROR (Deployment failed with errors). Also, callback function(BuildErrProc) is not being called. How can I overcome this problem? BTW I am using WindowsXP-32bit, Powerbuilder 11.2, EAServer 5.5, QT-4.8.0 opensource vs2010.

void __stdcall BuildErrProc(LPVOID lpUserData) {
  PPBORCA_BLDERR blderr = (PPBORCA_BLDERR)lpUserData;
  QString s;
  s = QString::fromStdWString(blderr->lpszMessageText);
  QMessageBox::information(0,"",s);
}

int WINAPI BuildProject(QString currentApplLibName,QString currentApplName,QString projectLibName,QString projectName,QStringList libraryNames)
{
  PBORCA_BLDPROC fpBuildErrProc;
  PPBORCA_BLDERR pBldErrData;
  fpBuildErrProc = (PBORCA_BLDPROC) BuildErrProc;
  pBldErrData = (PPBORCA_BLDERR) new PBORCA_BLDERR;
  memset(pBldErrData, 0x00, sizeof(PBORCA_BLDERR));

  HPBORCA hORCASession;
  hORCASession = SessionOpen();
  printf("Setting library list..\n");    
  LPTSTR* pLibNames = new LPTSTR[libraryNames.size()];
  for(int i=0;i<libraryNames.size();i++) {
      pLibNames[i]=(LPTSTR)libraryNames.at(i).utf16();
  }
  int r = PBORCA_SessionSetLibraryList(hORCASession, pLibNames, libraryNames.size());
  if(r==0) {
      printf("Library list OK.\n");
      QMessageBox::information(0,"",currentApplName);
      r = PBORCA_SessionSetCurrentAppl(hORCASession,(LPTSTR)currentApplLibName.utf16(),(LPTSTR)currentApplName.utf16());
      if(r==0) {
          printf("Setting current appl OK.\n");         
          r = PBORCA_BuildProject(hORCASession,(LPTSTR)projectLibName.utf16(),(LPTSTR)projectName.utf16(),fpBuildErrProc,pBldErrData);
          if (r==0) {
              printf("Building current prj OK.\n");
          } else {
              printf("Build FAILURE:%d\n",r);
          }
      } else {
          printf("Current appl FAILURE.\n");
      }
  } else {
      printf("Library list FAILURE:%d\n",r);
  }
  SessionClose(hORCASession);
  return r;
}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

等待我真够勒 2025-01-03 01:38:41

我解决了。图书馆列表错误。当我设置正确的库列表时,它成功构建了项目。

I resolved it. Library list was wrong. When I set correct lib list it built the project successfully.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文