guid

Error when attempting to Resume a Windows Workflow

你离开我真会死。 提交于 2020-01-07 02:23:39
问题 When attempting to Resume a Workflow with the following code: public WorkflowApplication LoadInstance(Guid instanceId) { if (this.instances.ContainsKey(instanceId)) return this.instances[instanceId]; WorkflowApplication instance = new WorkflowApplication(new Tarpon.Workflows.CreateContact()); // Create Persistable Workflow SqlWorkflowInstanceStore store = new SqlWorkflowInstanceStore(ConfigurationManager.ConnectionStrings["WorkflowPersistance"].ConnectionString); store.HostLockRenewalPeriod =

Proper QUuid usage in Qt ? (7-Zip DLL usage problems (QLibrary, QUuid GUID conversion, interfaces))

微笑、不失礼 提交于 2020-01-06 19:35:26
问题 I'm trying to write a program that would use 7-Zip DLL for reading files from inside archive files (7z, zip etc). Here's where I'm so far: #include <QtCore/QCoreApplication> #include <QLibrary> #include <QUuid> #include <iostream> using namespace std; #include "7z910/CPP/7zip/Archive/IArchive.h" #include "7z910/CPP/7zip/IStream.h" #include "MyCom.h" // {23170F69-40C1-278A-1000-000110070000} QUuid CLSID_CFormat7z(0x23170F69, 0x40C1, 0x278A, 0x10, 0x00, 0x00, 0x01, 0x10, 0x07, 0x00, 0x00);

how to convert byte[100] to guid

一笑奈何 提交于 2020-01-06 07:23:11
问题 I am receiving a service response which is byte[100] how can i convert it to a guid ? byte[] response = wc.UploadValues(url, "POST", nvc); string Guid = new Guid(response).ToString(); Response.Write(Guid); 回答1: There is a Guid constructor which allows you to initialize a Guid from a 16-element byte array. So you will have to first extract the 16 elements from your 100 elements array into a new one and then initialize the Guid. Which 16 elements to extract from your 100 elements array would of

How to use SQL's LIKE on a guid in Entity Framework?

China☆狼群 提交于 2020-01-06 04:17:47
问题 In SQL Server, uniqueidentifier columns can be used like strings with the LIKE comparison: SELECT * FROM dbo.Table WHERE GuidColumn LIKE '4c38e01e%' How can I use this feature in Entity Framework? I want something like this context.Table.Where(x => x.StringColumn.Contains("some string")) but for a Guid column instead for string columns: context.Table.Where(x => x.GuidColumn ???? "4c38e01e") 回答1: As far as I know there is no way to convert Guid to string on the fly in EntityFramework. I'm

How can I get the current user-GUID in SharePoint 2010?

房东的猫 提交于 2020-01-06 03:56:24
问题 How can I get the GUID of the current user in SharePoint 2010 with C#? The following is my code: public string readAndEncodeGUID() { Guid userGuid = Guid.Empty; SPSecurity.RunWithElevatedPrivileges(delegate() { SPWeb readWeb = SPContext.Current.Web; SPUser currUser = SPContext.Current.Web.CurrentUser; userGuid = new Guid(currUser.RawSid); }); //Variable = encode USER-GUID return userGuid.ToString(); } The RawSid get not the right "number". thanks 回答1: Check out the SPUser members. You should

Delphi - multiple remote com objects

梦想与她 提交于 2020-01-06 01:58:49
问题 My D5 application is on a server being used remotely by a couple of users, so I need use the following function to create a COM object to launch another application (LmPos) installed back on that users PC upon launch: CreateRemoteComObject(const MachineName: WideString; const ClassID: TGUID): IUnknown; rather than creating a local COM object as before: EposServer := CreateOLEObject('POS.Server'); However, the MachineName and ClassID to connect to will depend on which users is launching this

Is it a risk squishing GUID to 64bits to use as a login key?

僤鯓⒐⒋嵵緔 提交于 2020-01-05 06:32:10
问题 Before asking i searched SO and found this answer which essentially says GUID are predictable and thus should never be used for anything random. But from my understanding i disagree. However this question is about squishing a GUID From my understanding a GUID is made of part MAC address, time and random number. I dont know what part of the GUID is what but this function essentially uses it as 2 64bit ints and XOR them together. I currently use the result as 1) A reset key for people who want

how to enter values in rowguid column?

末鹿安然 提交于 2020-01-03 13:36:07
问题 can anyone please tell me the right way to insert values in the rowguid column of the table? I m using sql server management studio 回答1: use the NEWID() function to generate one: CREATE TABLE myTable(GuidCol uniqueidentifier ,NumCol int) INSERT INTO myTable Values(NEWID(), 4) SELECT * FROM myTable or you can set it as a default value: CREATE TABLE myTable(GuidCol uniqueidentifier DEFAULT NEWSEQUENTIALID() ,NumCol int) INSERT INTO myTable (NumCol) Values(4) SELECT * FROM myTable 回答2: You can

How to generate a version 1 Guid in .NET?

女生的网名这么多〃 提交于 2020-01-03 11:57:22
问题 As I understand it, Version 1 Guids that relied on timestamps and MAC address, were replaced by Version 4 - more random - in Windows 2000 or thereabouts. What's the easiest way to generate a Version 1 guid from .Net, if I prefer it to a version 4? (I do want the timestamp and (almost) unique machine id to be extractable. I do control the entire environment - I'm ok with privacy/any loss of absolute randomness) Thanks. 回答1: P/Invoke UuidCreateSequential - it returns type 1 guids: For security

working with Fluent NHibernate and guid ids

断了今生、忘了曾经 提交于 2020-01-02 05:08:06
问题 We're working with Fluent NHibernate 1.2 and our primary key is a guid saved in a nvarchar(32) column, working with Oracle 11gr2. How can we make this work? (making an automatic conversion...) Thanks ahead, random programmer... UPDATE: forgot to mention, the guid is saved WITHOUT dashes ... 回答1: Update: You will have to implement your own IUserType to handle the dashless Guids. You can read about it here: http://dotnet.dzone.com/articles/understanding-nhibernate-type The detail below is now