Hosted by 2WDH.com .:. Professional and affordable web hosting...
 Home | Forums | Donate
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Grim Fandango Half Life Mod!!
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Twisted Mind Games Forums Forum Index -> Random Discussion
View previous topic :: View next topic  
Author Message
James
3run
3run


Joined: 19 May 2003
Posts: 3756

PostPosted: Tue Oct 07, 2003 6:07 am    Post subject: Reply with quote

It is C++ based programming. If anyone could programme in C++, then that would be different (I might do it, becuase I have started learning C++)
_________________
Back to top
View user's profile Send private message Send e-mail Visit poster's website
The Big Bad Wolf
Level 6: The Experiment
Level 6: The Experiment


Joined: 03 Sep 2003
Posts: 214

PostPosted: Wed Oct 08, 2003 12:38 pm    Post subject: Reply with quote

It sounds very complicated!
_________________


Guess who's back, back again?
Back to top
View user's profile Send private message
James
3run
3run


Joined: 19 May 2003
Posts: 3756

PostPosted: Wed Oct 08, 2003 12:41 pm    Post subject: Reply with quote

Code:
HRESULT CreateMSMQQueue(
                        LPWSTR wszPathName,
                        PSECURITY_DESCRIPTOR pSecurityDescriptor,
                        LPWSTR wszOutFormatName,
                        DWORD *pdwOutFormatNameLength
                        )
{

  // Define the maximum number of queue properties.
  const int NUMBEROFPROPERTIES = 2;


  // Define a queue property structure and the structures needed to initialize it.
  MQQUEUEPROPS   QueueProps;
  MQPROPVARIANT  aQueuePropVar[NUMBEROFPROPERTIES];
  QUEUEPROPID    aQueuePropId[NUMBEROFPROPERTIES];
  HRESULT        aQueueStatus[NUMBEROFPROPERTIES];
  HRESULT        hr = MQ_OK;
 
 
  // Validate the input parameters.
  if (wszPathName == NULL || wszOutFormatName == NULL || pdwOutFormatNameLength == NULL)
  {
    return MQ_ERROR_INVALID_PARAMETER;
  }
 
 
  // Set queue properties.
  DWORD cPropId = 0;
  aQueuePropId[cPropId] = PROPID_Q_PATHNAME;
  aQueuePropVar[cPropId].vt = VT_LPWSTR;
  aQueuePropVar[cPropId].pwszVal = wszPathName;
  cPropId++;

  WCHAR wszLabel[MQ_MAX_Q_LABEL_LEN] = L"Test Queue";
  aQueuePropId[cPropId] = PROPID_Q_LABEL;
  aQueuePropVar[cPropId].vt = VT_LPWSTR;
  aQueuePropVar[cPropId].pwszVal = wszLabel;
  cPropId++;


  // Initialize the MQQUEUEPROPS structure.
  QueueProps.cProp = cPropId;               // Number of properties
  QueueProps.aPropID = aQueuePropId;        // IDs of the queue properties
  QueueProps.aPropVar = aQueuePropVar;      // Values of the queue properties
  QueueProps.aStatus = aQueueStatus;        // Pointer to the return status


  // Call MQCreateQueue to create the queue.
  WCHAR wszFormatNameBuffer[256];
  DWORD dwFormatNameBufferLength = sizeof(wszFormatNameBuffer)/sizeof(wszFormatNameBuffer[0]);
  hr = MQCreateQueue(pSecurityDescriptor,         // Security descriptor
                     &QueueProps,                 // Address of queue property structure
                     wszFormatNameBuffer,         // Pointer to format name buffer
                     &dwFormatNameBufferLength);  // Pointer to receive the queue's format name length


  // Return the format name if the queue is created successfully.
  if (hr == MQ_OK || hr == MQ_INFORMATION_PROPERTY)
  {
    if (*pdwOutFormatNameLength >= dwFormatNameBufferLength)
    {
      wcsncpy(wszOutFormatName, wszFormatNameBuffer, *pdwOutFormatNameLength - 1);
      wszOutFormatName[*pdwOutFormatNameLength - 1] = L'\0';
      *pdwOutFormatNameLength = dwFormatNameBufferLength;
    }
    else
    {
      wprintf(L"The queue was created, but its format name cannot be returned.\n");
    }
  }
  return hr;
}


Wink
_________________
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Michaelz
Level 8: The Take-Down
Level 8: The Take-Down


Joined: 10 Jun 2003
Posts: 764
Location: UK: In the loo having a poo

PostPosted: Wed Oct 08, 2003 1:06 pm    Post subject: Reply with quote

okay then... Shocked
_________________
Screw you suckers!!!!
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Twisted Mind Games Forums Forum Index -> Random Discussion All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group