private void btnCreateString_Click(object sender, EventArgs e) { String namStringMem = tbMemStringCreate.Text; int stringQuantity = Convert.ToInt32(tbStringQuantity.Text); int ret = SmClientStdCall.createMemory(namStringMem, stringQuantity, (int)SmClientStdCall.memoryType.String); if (ret == 0) { MessageBox.Show("Shared Memory was created correctly", "SM type: String", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("Error opening Shared Memory", "SM type: String", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void btnCreateInt_Click(object sender, EventArgs e) { String namIntMem = tbMemIntCreate.Text; int intQuantity = Convert.ToInt32(tbIntQuantity.Text); int ret = SmClientStdCall.createMemory(namIntMem, intQuantity, (int)SmClientStdCall.memoryType.Integer); if (ret == 0) { MessageBox.Show("Shared Memory was created correctly", "SM type: Integers", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("Error creating Shared Memory", "SM type: Integers", MessageBoxButtons.OK, MessageBoxIcon.Error); } }